[jboss-user] [JBossWS] - Re: setHeader and setServerURL, using javax.xml.ws.Service?

eric@attask.com do-not-reply at jboss.com
Mon Jul 30 17:10:49 EDT 2007


Yeah I too could do the simple "Hello World", but i don't know how to include a complex type, such as 

  | <soapenv:Header>
  |      <urn:SessionHeader>
  |         <urn:sessionId>QwWsHJyTPW.1pd0_jXlNKOSU</urn:sessionId>
  |      </urn:SessionHeader>
  | </soapenv:Header>	

as a header. Notice it wraps sessionId inside SessionHeader.

I've tried a number of things including
StubExt soapStub =  (StubExt)soapBinding;
  | QName headerQ = new QName(service.getServiceName().getNamespaceURI(), "SessionHeader");
  | QName sessionId = new QName(service.getServiceName().getNamespaceURI(), "SessionHeader", "sessionId");
  | soapStub.addUnboundHeader(headerQ, Constants.TYPE_LITERAL_STRING, String.class, ParameterMode.IN);
  | soapStub.setUnboundHeaderValue(sessionId, "QwWsHJyTPW.1pd0_jXlNKOSU");

but that only managed to produce:

  | <ns1:SessionHeader xmlns:ns1='urn:partner.soap.sforce.com'>QwWsHJyTPW.1pd0_jXlNKOSU</ns1:SessionHeader>


I've tried several other things bug I haven't had much luck.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068906#4068906

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068906



More information about the jboss-user mailing list