Am Dienstag, den 13.11.2007, 14:03 -0600 schrieb Asleson, Ryan:
> Once I did that, when I run the test, it fails with this error:
>  
> org.apache.cxf.binding.soap.SoapFault: Server did not recognize the
> value of HTTP Header SOAPAction: .
>  
> I can't for the life of me figure out what might be wrong.  Notice
> that
> there's no text between the colon and the period at the end of the
> message.  It appears that some text should be there.
>  

Oh, that one's simple.  Most likely, no value for SOAP action was
provided where one is required.  No text because no SOAP action.


I incurred a similar headache yesterday in a failed effort to create a
client to work with an older Axis 1.x web service--even though the WSDL
appeared good, neither CXF nor Metro could create a workable client.

You may want to try using GlassFish Metro to see if you also have the
same problems creating a client.  It could be your web service is too
old and non-standard.  (The build file here[1] can help you quickly set
up a Metro client.)  AFAIK Axis2 is not a pure JAX-WS implementation and
may have hooks in it that allow it to work with older Axis1.x web
services.

As for coding, if you look at the options you have for binding
provider[2], the problem may be that you need to set the
SOAPACTION_USE_PROPERTY to true *and* provide a legitimate URI value for
the SOAPACTION_URI_PROPERTY.  Something like this:

MyService myService = new SynonymsService();
MyPortType endpt = myService.getServicePortType();
            
((BindingProvider)endpt).getRequestContext().
    put(BindingProvider.SOAPACTION_USE_PROPERTY, true);
((BindingProvider)endpt).getRequestContext().
    put(BindingProvider.SOAPACTION_URI_PROPERTY,
"http://www.whatever.com/...";); 

Why is this required?  Normally it is not--I'm guessing because you're
using SOAP 1.2 syntax in your WSDL that that makes the SOAPAction
property required.  Also, another thing to keep in mind is that, if it
were required, normally the SOAPAction would be defined *in* the WSDL
binding section (although it's not in your case.)

Clear as mud, perhaps, but just trying to help...

Regards,
Glen

[1] http://www.jroller.com/gmazza/date/20070817 (step 5)

[2]
http://java.sun.com/javaee/5/docs/api/javax/xml/ws/BindingProvider.html



Reply via email to