You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Brad (JIRA)" <ji...@apache.org> on 2007/05/04 09:29:15 UTC

[jira] Created: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

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.1.1
         Environment: JDK 1.4.2._13
            Reporter: Brad


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


[jira] Commented: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Keith Godwin Chapman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494666 ] 

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

The -pn option is taken into account only when stubs are generated (i.e. We do not look at the binding when genarating skeletons). I tried genarating code with ur wsdl (It actually does not genarate code when you use the httpBinding due to the reason pointed out by Amila). Seems like you have genarated code for the soap binding. 

> 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


[jira] Commented: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Brad (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494664 ] 

Brad commented on AXIS2-2638:
-----------------------------

Do you mean have I generated the code for the server side? If so, then no. The server side is out of my control, it is a service which I want to call but I have no influence over the WSDL.

I appreciate your point on WSDL version but the WSDL is not mine to change. 

I think this still needs to be fixed. The API offers the ability to set these options on the surface, but underneath the options aren't actually applied.

> 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


[jira] Commented: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Brad (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494747 ] 

Brad commented on AXIS2-2638:
-----------------------------

Keith/Amila,

I just tried it with the -sn option:

wsdl2java.bat -pn LookupUKSoap -sn LookupUKSoap -o src -d xmlbeans
-uri postcodeAnywhere.wsdl

I got the same error:

org.apache.axis2.AxisFault: Transport error 500 . Error Message is
Request format is invalid: text/xml; charset=UTF-8.;

Do you guys think this is a bug or is it just because I'm not calling
wsdl2java in the right way?


> 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


[jira] Updated: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Brad (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brad updated AXIS2-2638:
------------------------

    Attachment: postcodeAnywhere.wsdl

The WSDL for the service I'm trying to call.

> 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.1.1
>         Environment: JDK 1.4.2._13
>            Reporter: Brad
>         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


[jira] Commented: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Keith Godwin Chapman (JIRA)" <ji...@apache.org>.
    [ 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


[jira] Resolved: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Keith Godwin Chapman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Godwin Chapman resolved AXIS2-2638.
-----------------------------------------

    Resolution: Invalid

Seems like its not a bug, but a misunderstanding.

> 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
>            Assignee: Keith Godwin Chapman
>         Attachments: postcodeAnywhere.wsdl, unknownHost.JPG
>
>
> 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


[jira] Assigned: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe reassigned AXIS2-2638:
----------------------------------------

    Assignee: Keith Godwin Chapman

> 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


[jira] Commented: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494645 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-2638:
-----------------------------------------------------

Are you generating the code for the Soap binding?
you have specified some thing like,
wsdl2java.bat -pn xxxxxSoap

In WSDL 1.1 http binding is not properly defined. Axis2 supports only wsdls in the RPC style (i.e. you have to use the type attribute instead of element in messages) for HttpBindings. But your HttpBinding has some messages with referes to elements in part. So you won't be able to generate the code for Http binding.

if you use the HttpBinding then the better way is to use the WSDL 2.0 which properly define http binding. 


> 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


[jira] Commented: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Keith Godwin Chapman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496775 ] 

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

Try using the axis2 tcpMonitor.

> 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, unknownHost.JPG
>
>
> 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


[jira] Updated: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Brad (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brad updated AXIS2-2638:
------------------------

    Attachment: unknownHost.JPG

Hi,

sorry for the delay in getting back to you. I tried sending the
message through Axis 1.4 TcpMonitor but it threw unknown host error
for the endpoint. Even though I could ping the exact same address from
the same box.

I'll try to work out what's going wrong and find out what the docs
look like on the wire.

Brad



> 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, unknownHost.JPG
>
>
> 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


[jira] Updated: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Brad (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brad updated AXIS2-2638:
------------------------

    Affects Version/s: 1.2

Also tested with Axis2-1.2 which gave the same result.

> 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
>         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


[jira] Commented: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Brad (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494686 ] 

Brad commented on AXIS2-2638:
-----------------------------

Ok, I'm not sure I understand what your point is then. Sorry for being a bit slow, I'm pretty new to Axis.

Originally I didn't use the option "-pn LookupUKSoap" but I wasn't having any success so I thought best to specify one of the three ports in the WSDL. From what you are saying it sounds like you think I shouldn't be generating code for the SOAP binding. Is that a correct because I was pretty sure that was what I wanted to do in the first place!

I realise I'm probably missing something fundamental here but I would like to get this resolved. I've generated stubs and used them to call the service which returns a 500 error about the content type. I tried setting the content type in the options but it doesn't filter down to the transport layer (commons-http). Isn't that the essence of the problem?

Once again, apologies for not being on the same wavelength here. 

> 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


[jira] Commented: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494704 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-2638:
-----------------------------------------------------

Ok ...
So if you invoke a out side service, what is the binding that server uses for the epr you specified. It seems that you try to invoke a Httpbinding epr using a soap request.


> 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


[jira] Commented: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Keith Godwin Chapman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495033 ] 

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

Could you please try and capture the request and responce using tcp monitor and send it. test/xml is the content type to be used when SOAP 1.1 is used so its not a bug in Axis2.

Regarding the question on SOAP and HTTPBindings. When I said SOAP binding i meant SOAP over HTTP. HTTPBinding is merely a RESTBinding, where you dont send SOAP messages. The messages are sent in the url or in the body as plain xml.

> 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


[jira] Commented: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Brad (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494740 ] 

Brad commented on AXIS2-2638:
-----------------------------

Keith,

I'm trying to change the content type because I got this error from the server:

Transport error 500 . Error Message is Request format is invalid:
text/xml; charset=UTF-8.
;

I assumed it was the content type, I think in part because I saw this :

<wsdl:binding name="LookupUKHttpPost" type="tns:LookupUKHttpPost">
		<http:binding verb="POST"/>
		<wsdl:operation name="Browse">
			<http:operation location="/Browse"/>
			<wsdl:input>
				<mime:content type="application/x-www-form-urlencoded"/>

Obviously this isn't the right service in the WSDL so bad assumption
on my part I guess.

I'll try it with the -sn option.





> 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


[jira] Commented: (AXIS2-2638) stub sending text/xml instead of application/x-www-form-urlencoded

Posted by "Brad (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494741 ] 

Brad commented on AXIS2-2638:
-----------------------------

Amila,

I think this is where my understanding starts to get fuzzy. I thought
I was trying to send a SOAP request over HTTP? You mean as in using
HTTP for the transport as apposed to (for example) SMTP or JMS? Isn't
that what I should be trying to do?

Brad.



> 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