You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-user@ws.apache.org by Julie McCabe <ju...@qub.ac.uk> on 2006/01/10 17:49:19 UTC
A WS-Addressing Action SOAP header element is required by this endpoint
Hello,
I have a simple service deployed and I wish to create instances of that
service via a client using the Call object. Im using apache-wsrf 1.1, tomcat
5.5.12, java 1.5.0_03 and ws-addressing 1.0.
The source code is as follows:
Call call = (Call) (new Service()).createCall();
// Set XML document format
call.setOperationStyle(Style.DOCUMENT);
call.setOperationUse(Use.LITERAL);
// Set SOAPAction
call.setUseSOAPAction(true);
call.setSOAPActionURI("http://www.qub.ac.uk/prismApache/myservice/HelloWorldPortType");
// Set endpoint adderss
call.setTargetEndpointAddress("http://localhost:8088/wsrf/services/HelloWorldPort");
// Set operation name
call.setOperationName(new QName("HelloWorld", "createInstance"));
// Set the return type
call.setReturnType(new QName("org.apache.ws.resource.Resource"));
// add parameter
call.addParameter("createInstance", XMLType.XSD_STRING, ParameterMode.IN);
// invoke
Object[] argValue = {"HelloWorldResourceID"};
HelloWorldPortResource resource = (HelloWorldPortResource)
call.invoke(argValue);
This code compiles and when I execute it against a deployed service in order
to create a resource i get the following error message:
A WS-Addressing Action SOAP header element is required by this endpoint.
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at ...................
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at SecureOperation.Call(SecureOperation.java:127)
at SecureOperation.main(SecureOperation.java:144)
I have set the SOAPAction object - perhaps it is not the correct value?
I have used WS-Addressing in another WSRF toolkit which was not dependent on
the SOAPAction element - is there something missing or incorrect with the
code?
I read in the archive about developing clients other than using the
soapclient.xml provided - this is what Im trying to do - therefore do I need
to use the WS-Addressing wsdl2java tool? If so does anybody have a direct
link as I seem to get lost in its web pages!
Many thanks,
Julie.
---------------------------------------------------------------------
To unsubscribe, e-mail: wsrf-user-unsubscribe@ws.apache.org
For additional commands, e-mail: wsrf-user-help@ws.apache.org