axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Godwin Chapman (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded
Date Thu, 10 May 2007 10:54:15 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494701
] 

Keith Godwin Chapman commented on AXIS2-2638:
---------------------------------------------

If you are using Axis2-1.2 and you dont specify the -pn and -sn options then it tries to genarate
stubs for all ports. If you want to genarate stubs for a single port (it seems like you want
to genarate a stub for the SOAP endpoint) then use the -pn and -sn option. 

In your case use -pn LookupUKSoap -sn LookupUK.

Looking at the transport uri in the binding (which is http://schemas.xmlsoap.org/soap/http)
the SOAP version is 1.1 and hence the content type of the request if text/xml. text/xml is
the contentType of SOAP 1.1. Why are you trying to change the contentType to application/x-form........?

Just try and send your messages through tcp monitor so that you can see whants wrong with
the request/responce. 

> stub sending text/xml instead of application/x-www-form-urlencoded
> ------------------------------------------------------------------
>
>                 Key: AXIS2-2638
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2638
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.2, 1.1.1
>         Environment: JDK 1.4.2._13
>            Reporter: Brad
>         Assigned To: Keith Godwin Chapman
>         Attachments: postcodeAnywhere.wsdl
>
>
> Hi all,
> I've generated client classes from a WSDL doc using the following command line:
> wsdl2java.bat -pn xxxxxSoap -o src -d xmlbeans -uri xxxxxxx.wsdl
> It all works fine but when I try to invoke the remote service I get
> the following error:
> org.apache.axis2.AxisFault: Transport error 500 . Error Message is
> Request format is invalid: text/xml; charset=UTF-8.
> ;
> Which is fair enough as the server is expecting content type
> "application/x-www-form-urlencoded", as specified in the WSDL:
> <wsdl:operation name="xxxxx">
>    <http:operation location="/xxxxx"/>
>        <wsdl:input>
>             <mime:content type="application/x-www-form-urlencoded"/>
>        </wsdl:input>
>        <wsdl:output>
>            <mime:mimeXml part="Body"/>
>        </wsdl:output>
> </wsdl:operation>
> Is there any way to over ride the content type? I tried this:
>                        Options opts = new Options();
>                        opts.setProperty(Configuration.CONTENT_TYPE,
> HTTPConstants.MEDIA_TYPE_X_WWW_FORM);
>                        opts.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);
>                        client.setOptions(opts);
> I get the same error though. I tried client.setOverrideOptions(opts)
> as well but no change. Using them both causes a StackOverflowError :-)
> Any help greatly appreciated!
> Cheers,
> Brad.
> ----------------------------------------------------------------------------------------------------------------------------------
> Brad,
> Could you please log a bug in JIRA and upload your wsdl. Something is
> seriously wrong esp with the StackOverflowError.
> thanks,
> dims

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message