• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAX-WS - several newbie questions.  RSS feed

Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Disclaimer - I have very little experience (or understanding) of how the entire webservice - SOAP world works; what little understanding I have is pretty painful. Be gentle.

I'm attempting to access a ASP/IIS webservice published by a third party. It's a content billing service. The only call I make to this interface is purchase(...) - parameters are txn reference ids, content charges etc. Immaterial, anyway.

Part of the specification for this service requires a SOAP header block, containing four fields in an <authentication> element. It looks like this:
<authentication xmlns="http://remote.host">

I've tried building this service with JAX-RPX 1.1 and Axis 1.2; neither allowed me to manipulate and send a SOAP header block using classes generated with wscompile and the axis client class generators respectively.

I downloaded and installed JAX-WS 2.0, and generated the classes. I can now create and populate the correct header blocks.

Several things concern me. Firstly, the JAX-WS soap messages appear as such:

<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">

I do not get any remote exceptions; I am however worried that the remote machine might be expecting elements with the <soap:Header> and <soap:Body> rather than S:Header and S:Body - anyone know if it is possible to change this?

Second: How do I specify the XML encoding for the soap message? It should be UTF-8. I can't find any methods that will allow me to set the message encoding.

Thirdly, the authentication block generated by JAX-WS looks like this:

<authentication xmlns="http://remote.host/"><Interface_Login xmlns="">un</Interface_Login><Interface_Password xmlns="">pw/Interface_Password><ClientLogin xmlns="">un</ClientLogin><ClientPassword xmlns="">pw</ClientPassword></authentication>

Even though I create the four subelements with no explicit namespace. I know this shouldn't be a problem for a decent remote XML parser, but I'm not sure of the quality of the parser used by the remote site I'm connecting to.

Lastly (this is just a whine) - the JAX-WS annotations make me want to slit my wrists. At least I could trace through the JAX-RPC stub classes. Ugh.

thanks, and sorry if this is covered somewhere else.
[ June 28, 2007: Message edited by: Jeremy Botha ]
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!