Newbie question: Failed to create message body.More than one operation found

58 views
Skip to first unread message

choo...@gmail.com

unread,
Jul 23, 2013, 6:28:15 PM7/23/13
to jsonweb...@googlegroups.com
Hi all,

I recently started studying json based webservices and followed your tutorial on helloworld. But when I call my webserive using a client it generates an error on tomcat :
"SEVERE: Couldn't create SOAP message due to exception: com.jaxws.json.codec.JSONFault: Failed to create message body.More than one operation found
com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: com.jaxws.json.codec.JSONFault: Failed to create message body.More than one operation found
at com.jaxws.json.codec.JSONCodec.throwMessageCreationException(JSONCodec.java:541)
at com.jaxws.json.codec.JSONCodec.decode(JSONCodec.java:514)
at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276)
...
Caused by: com.jaxws.json.codec.JSONFault: Failed to create message body.More than one operation found
at com.jaxws.json.codec.decode.FormDecoder.getFormData(FormDecoder.java:177)
at com.jaxws.json.codec.decode.FormDecoder.getWSMessage(FormDecoder.java:84)
at com.jaxws.json.codec.JSONCodec.decode(JSONCodec.java:508)
... 26 more
Caused by: java.lang.RuntimeException: More than one operation found
at com.jaxws.json.codec.decode.FormDecoder.getFormData(FormDecoder.java:174)
... 28 more"

The json message im sending from the client is:
{"auth":{ "email": "john...@example.com", "password": "xxxxx"}}

Using:"

HttpsURLConnection  conn = (HttpsURLConnection) url.openConnection();
conn.setInstanceFollowRedirects(true);
conn.setRequestMethod("POST");
conn.setDoInput(true);
conn.setDoOutput(true);
                //just to test webservice
String jsonMessage = " {\"auth\":{ \"email\": \"john...@example.com\", \"password\": \"605b32dd\"}}";
DataOutputStream output = new DataOutputStream( conn.getOutputStream() );
output.write( jsonMessage.getBytes("UTF-8") );
System.out.println("request message:" + jsonMessage);
output.flush();
output.close();
resp_code = conn.getResponseCode();

"


The webservice is:
"
@SOAPBinding(style = SOAPBinding.Style.RPC) 
@WebService (name="Authenticate", targetNamespace="http://album.jsonplugin.com/json/") 
public class Authenticate {

    @WebMethod(operationName = "auth")
    public @WebResult(name="message") String auth(
              @WebParam(name="email") String email, @WebParam(name="password") String password){
                    ...
     }
"






Can you guys help me out? do you need more info? Thanks alot ;)

choo...@gmail.com

unread,
Jul 23, 2013, 6:45:01 PM7/23/13
to jsonweb...@googlegroups.com
On the client side I get "Request Method:POST
Request Header :{null=[HTTP/1.1 500 Internal Server Error], Date=[Tue, 23 Jul 2013 22:36:44 GMT], Content-Length=[4645], Connection=[close], Content-Type=[application/json], Server=[Apache-Coyote/1.1]}
Resp Code: 500
Resp Message: Internal Server Error
Resp Location: response : 500

Sundar Murthi

unread,
Jul 24, 2013, 3:52:24 AM7/24/13
to jsonweb...@googlegroups.com
Hi,
     Can you provide me more information of which version of json codec jar and which version of jax-ws or metro version your using?

At first look from exception json jar is not in sync with latest version.



Regards
  Sundar



--
You received this message because you are subscribed to the Google Groups "jsonwebservice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsonwebservic...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

choo...@gmail.com

unread,
Jul 25, 2013, 5:58:32 PM7/25/13
to jsonweb...@googlegroups.com
Hi,

json codec : jsonwebservice-ri-0.4.jar
jax-ws : dunno I used the war in the tutorial and cant find any jax-ws jar...
Reply all
Reply to author
Forward
0 new messages