Chris Wale

Greenhorn
+ Follow
since May 23, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Chris Wale

Hello,

I am working on a JAX-RPC client using Axis and one of the webservices I am calling needs ws-security another one does not. I am guessing that I need to turn the wss4j api off for that call or set the mustunderstand flag to false but have not found a way to do that on the fly. (I am using generated interface stubs in my client.)

Any help would be appreciated.

Thanks.

Chris
15 years ago
Thanks Ulf,

The ws-security was what I was missing. Thanks.

One comment for others is that I did not see any link in the document as to where to get the xmlsec jar could be found but I got it at http://santuario.apache.org (If it is in the doc but I missed it sorry).

Thanks again,

Chris
15 years ago
Hello,

I am using an Axis 1.4 client with a WebSphere 6.1 web service. I am using the username/password properties in the soap header to pass auth data. When I create a thin client not using Axis I can pass the auth data tot he web service fine and it all works but when I try to do the same thing with the Axis client I get.

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.securityException
faultSubcode:
faultString: com.ibm.wsspi.wssecurity.SoapSecurityException: WSEC5048E: One of "SOAP Header" elements required.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:com.ibm.wsspi.wssecurity.SoapSecurityException: WSEC5048E: One of "SOAP Header" elements required.
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at ca.ontario.health.crs.RegistrationSoapBindingStub.signOn(RegistrationSoapBindingStub.java:454)
at test.main(test.java:64)

I am using the WSDL2Java stubs in the client and then trying to add in the username/password to the Call class. Here is the code.



When I try and access the SOAP Header this way:

_call.getMessageContext().getRequestMessage().getSOAPHeader()

the value is null.

I am sure that it is something simple I am missing but I cannot seem to figure it out.

Thanks for any help.

Chris
15 years ago