2 Replies Latest reply on Apr 22, 2005 2:30 PM by platinumdragon

    Unexpected encoding style

      *Sigh* I'm almost there.. I can feel it.

      I have JBoss 4.0.1sp1 and jwsdp 1.5. I am using static invocation. Using tcpmon I can see the request being sent and the response coming back. It looks like it has the data I need, but I get the following exception from the client:

      java.rmi.RemoteException: Runtime exception; nested exception is:
       unexpected encoding style: expected=http://schemas.xmlsoap.org/soap/encoding/, actual=
       at com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(StreamingSender.java:318)
       at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:300)
       at
       ...
      Caused by: unexpected encoding style: expected=http://schemas.xmlsoap.org/soap/encoding/, actual=
       at com.sun.xml.rpc.encoding.SOAPDeserializationContext.verifyEncodingStyle(SOAPDeserializationContext.java:168)
       at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:175)
       at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:155)
       at
       ...
      com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:215)
       ... 3 more



      I don't think I'm doing anything special. There are only a few references on the web about this message. The only workaround I've seen is to edit the generated source files. I am hoping there is another way that I don't have to re-perform again. Maybe a configuration setting or something. Any ideas?

      Thanks,
      Mike


        • 1. Re: Unexpected encoding style
          thomas.diesler

          Your client expects the message to be soap encoded. What is actually beeing sent is literal encoded (the encoding URI is an empty string)

          The BasicProfile-1.0 prohibits soap encoding. JBossWS, which must be BP-1.0 compliant does not support it therefore.

          You should instruct your client to use literal encoding.

          • 2. Re: Unexpected encoding style

            Ah yes, thank you.

            I was using the wscompile -f:rpcliteral flag with the server, but not the client. Once I added that, it got past that error.

            Thanks,
            Mike