[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Antwort: Re: HTTPAPI - Problem consuming WCF web service - HTTP/1.1 400 Bad Request
I successfully downloaded and installed soapUI 3.6
(soapui-3.6-windows-bin.zip). In order to run soapUI 3.6 I had to
change my JAVA_HOME to a Java 1.6 JRE or JDK. Java 1.5 caused the
following exception:
c:\temp\soapui-3.6\bin>soapui.bat
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/cli/CommandLineParser
In order to fix the problem I change soapUI.bat as shown below:
@echo off
set SOAPUI_HOME=%~dp0
set JAVA_HOME=c:\Program Files\Java\jdk1.6.0_16\ <== new line
set JAVA=%JAVA_HOME%\bin\java
if not "%JAVA_HOME%" == "" goto SET_CLASSPATH
Thomas.
ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 14.09.2010 00:14:46:
> Von: thomas.raddatz@xxxxxxxxxxx
> An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> Datum: 14.09.2010 00:19
> Betreff: Re: HTTPAPI - Problem consuming WCF web service - HTTP/1.1
> 400 Bad Request
> Gesendet von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>
> You downloaded the wrong package. Please go to
> "[1]http://sourceforge.net/projects/soapui/", click on "View all
files" and
> download "soapui-3.6-windows-bin.zip".
>
> I did not yet download that file but installed v2.5.1 a long time
ago. I
> guess that 3.6 also contains a .bat file to lunch soapUI.
>
> Good luck.
>
> Thomas.
>
> Am 13.09.2010 22:20, schrieb kmiller@xxxxxxxxx:
> >
> > Thanks Scott. I've been trying to install SoapUI all day today.
I've
> > tried to install it on two different machines. I get the same
error on
> > both computers:
> >
> > A Virtual Machine Launcher window has the following error:
> > Failed to load Main-Class manifest attribute from
> > [path]maven-soapui-plugin-2.5.1[1].jar
> >
> > So I have posted this issue on their forum and am waiting for a
response.
> > Do you know of any other free wsdl programs?
> >
> >
> >
> >
> >
> >
> > Scott Klement
> > <sk@xxxxxxxxxxxxxxxx> To:
> HTTPAPI and FTPAPI Projects<ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> > Sent by: cc:
> > ftpapi-bounces@xxxxxxxxxxx Subject:
> Re: HTTPAPI - Problem consuming WCF web service - HTTP/1.1 400
Bad
> > klement.com Request
> >
> >
> > 09/13/2010 02:55 PM
> > Please respond to HTTPAPI
> > and FTPAPI Projects
> >
> >
> >
> >
> >
> >
> > Hello,
> >
> > Your SafeActivation.xml file makes the following references:
> >
> > <xsd:schema targetNamespace="[2]http://tempuri.org/Imports">
> > <xsd:import
> > schemaLocation="
> >
[3]http://745kmiller/SafeActivationAPI/SafeActivation.svc?xsd=xsd0"
> > namespace="[4]http://tempuri.org/"/>
> > <xsd:import
> > schemaLocation="
> >
[5]http://745kmiller/SafeActivationAPI/SafeActivation.svc?xsd=xsd1"
> >
namespace="[6]http://schemas.microsoft.com/2003/10/Serialization/"/>
> > <xsd:import
> > schemaLocation="
> >
[7]http://745kmiller/SafeActivationAPI/SafeActivation.svc?xsd=xsd2"
> > namespace="
> >
[8]http://schemas.datacontract.org/2004/07/SafeActivationServiceLibrar
y"/>
> > </xsd:schema>
> >
> > As you can see... not all of the definitions are in the XML you
sent.
> > It needs to connect to [9]http://745kmiller to get further
documents. Since
> > [10]http://745kmiller doesn't seem to exist on the public
Internet, I can't
> > take this any further. However, you can attempt to do it
yourself...
> >
> > Please load this WSDL file into SoapUI yourself, and see if you
can get
> > the web service to work through SoapUI. If you can, then please
check
> > the XML generated by SoapUI against what you have in your RPG
program.
> > Also check the SoapAction the same way.
> >
> > If you don't have a copy of SoapUI, you can get it here (get the
open
> > source, free version):
> > [11]http://www.soapui.org/
> >
> > Thanks
> >
> >
> >
> >
> > On 9/13/2010 2:23 PM, kmiller@xxxxxxxxx wrote:
> >>
> >> Thanks Scott and Thomas for the response.
> >>
> >> Thomas, I made the changes you suggested, and still received the
error.
> > I
> >> am attaching the full wsdl file and the RPG code. I couldn't
create the
> >> wsdl with CR/LF, but other than that, it should be complete.
> >> I'm using my IP address instead of the server name, as that has
worked
> > with
> >> all my other tests.
> >>
> >> Thanks for looking at this.
> >> (See attached file: SafeActivation.xml)(See attached file:
> > ConsumerRPG.txt)
> >>
> >>
> >>
> >>
> >> Thomas Raddatz
> >> <thomas.raddatz@xxxxxxxxxx To:
> > HTTPAPI and FTPAPI Projects<ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> >> e> cc:
> >> Sent by:
Subject: Re:
> > HTTPAPI - Problem consuming WCF web service - HTTP/1.1 400 Bad
> >> ftpapi-bounces@xxxxxxxxxxx
Request
> >> klement.com
> >>
> >>
> >> 09/13/2010 01:12 PM
> >> Please respond to HTTPAPI
> >> and FTPAPI Projects
> >>
> >>
> >>
> >>
> >>
> >>
> >> Maybe that I am wrong or that I have over looked something but on
my
> >> opinion you did not specify enough information to analyze the
problem. I
> > am
> >>
> >> missing:
> >>
> >> a) the "tns:GetData" element as defined in the<types> section
of the
> > wsdl
> >> file.
> >>
> >> b) the namespace value that is associated to the "tns" namespace
prefix
> >>
> >>
> >> So far the only things that seem to be clear are:
> >>
> >> a) the soap action value that you specified at
http_url_post_xml()
> >>
> >> b) the different host that you used at http_url_post_xml()
> >>
> >>
> >> Nevertheless here are some potential errors with your xml
request:
> >>
> >> a) '<SOAP :Body>' should be'<SOAP:Body>'
> >>
> >> b)<SOAP:Envelope'
> >> '
xmlns:SOAP="[12]http://schemas.xmlsoap.org/soap/envelope/"'
> >> '
xmlns:tns="[13]http://tempuri.org/ISafeActivationService/"'
> >>
> >> should be
> >>
> >> <SOAP:Envelope'
> >> '
xmlns:SOAP="[14]http://schemas.xmlsoap.org/soap/envelope/"'
> >> '
xmlns:tns="[15]http://tempuri.org/ISafeActivationService/">'
> >>
> >>
> >> The proper request should look like this one:
> >>
> >> SOAP =
> >> '<?xml version="1.0" encoding="iso-8859-1"
standalone="no"?>'
> >> +'<SOAP:Envelope'
> >> +'
xmlns:SOAP="[16]http://schemas.xmlsoap.org/soap/envelope/"'
> >> +'
xmlns:tns="[17]http://tempuri.org/ISafeActivationService/">'
> >> +'<SOAP:Body>'
> >> +'<tns:GetData>'
> >> +'<tns:value>'+ %trim(int1) +'</tns:value>'
> >> +'</tns:GetData>'
> >> +'</SOAP:Body>'
> >> +'</SOAP:Envelope>';
> >>
> >>
> >> Thomas.
> >>
> >> Am 13.09.2010 14:53, schrieb kmiller@xxxxxxxxx:
> >>>
> >>> I wrote a basic web service and was able to consume it fine.
Then I
> >> wrote
> >>> a WCF web service (Same basic code) and when I tryied to consume
it,
> >>> received the following error:
> >>>
> >>> HTTP/1.1 400 Bad Request
> >>>
> >>> I have attached the RPG code, the SVC file, and the error log.
Can
> >> someone
> >>> take a quick look to see if I have this set-up properly?
Thanks!!
> >>>
> >>> Here is the relevent RPG code:
> >>>
> >>> SOAP =
> >>> '<?xml version="1.0" encoding="iso-8859-1"
standalone="no"?>'
> >>> +'<SOAP:Envelope'
> >>> +'
xmlns:SOAP="[18]http://schemas.xmlsoap.org/soap/envelope/"'
> >>> +'
xmlns:tns="[19]http://tempuri.org/ISafeActivationService/"'
> >>> +'<SOAP :Body>'
> >>> +'<tns:GetData>'
> >>> +'<tns:value>'+ %trim(int1) +'</tns:value>'
> >>> +'</tns:GetData>'
> >>> +'</SOAP:Body>'
> >>> +'</SOAP:Envelope>';
> >>>
> >>> http_debug(*ON);
> >>>
> >>> rc = http_url_post_xml(
> >>>
'http://172.20.20.99/SafeActivationAPI/SafeActivation.svc/basic'
> >>> : %addr(SOAP) + 2
> >>> : %len(SOAP)
> >>> : *NULL
> >>> : %paddr(Incoming)
> >>> : %addr(String)
> >>> : HTTP_TIMEOUT
> >>> : HTTP_USERAGENT
> >>> : 'text/xml; charset=utf-8'
> >>> :
> >> 'http://tempuri.org/ISafeActivationService/GetData');
> >>>
> >>>
> >>> Here is the relevent xml from the SVC file:
> >>>
> >>> <wsdl:message
name="ISafeActivationService_GetData_InputMessage">
> >>> <wsdl:part name="parameters" element="tns:GetData"
/>
> >>> </wsdl:message>
> >>> -<wsdl:message name
> >> ="ISafeActivationService_GetData_OutputMessage">
> >>> <wsdl:part name="parameters"
element="tns:GetDataResponse"
> > />
> >>> </wsdl:message>
> >>> -<wsdl:message name="
> >>>
ISafeActivationService_GetDataUsingDataContract_InputMessage">
> >>> <wsdl:part name="parameters" element="
> >>> tns:GetDataUsingDataContract" />
> >>> </wsdl:message>
> >>> -<wsdl:message name="
> >>>
ISafeActivationService_GetDataUsingDataContract_OutputMessage">
> >>> <wsdl:part name="parameters" element="
> >>> tns:GetDataUsingDataContractResponse" />
> >>> </wsdl:message>
> >>> -<wsdl:portType name="ISafeActivationService">
> >>> -<wsdl:operation name="GetData">
> >>> <wsdl:input wsaw:Action="
> >>>
[20]http://tempuri.org/ISafeActivationService/GetData" message="
> >>> tns:ISafeActivationService_GetData_InputMessage" />
> >>> <wsdl:output wsaw:Action="
> >>>
[21]http://tempuri.org/ISafeActivationService/GetDataResponse"
> >>>
message="tns:ISafeActivationService_GetData_OutputMessage"
> > />
> >>> </wsdl:operation>
> >>> -<wsdl:operation name="GetDataUsingDataContract">
> >>> <wsdl:input wsaw:Action="
> >>>
> >>
[22]http://tempuri.org/ISafeActivationService/GetDataUsingDataContract
> >>> " message="
> >>>
> >> tns:ISafeActivationService_GetDataUsingDataContract_InputMessage"
> >>> />
> >>> <wsdl:output wsaw:Action="
> >>>
> >>
> >
[23]http://tempuri.org/ISafeActivationService/GetDataUsingDataContract
Response
> >>> " message="
> >>>
> >> tns:ISafeActivationService_GetDataUsingDataContract_OutputMessage
> >>> " />
> >>> </wsdl:operation>
> >>> </wsdl:portType>
> >>> -<wsdl:binding
name="WSHttpBinding_ISafeActivationService" type
> > ="
> >>> tns:ISafeActivationService">
> >>> <wsp:PolicyReference URI="
> >>> #WSHttpBinding_ISafeActivationService_policy" />
> >>> <soap12:binding transport="
> >> [24]http://schemas.xmlsoap.org/soap/http"
> >>> />
> >>> -<wsdl:operation name="GetData">
> >>> <soap12:operation soapAction="
> >>>
[25]http://tempuri.org/ISafeActivationService/GetData" style="
> >>> document" />
> >>> -<wsdl:input>
> >>> <wsp:PolicyReference URI="
> >>>
> > #WSHttpBinding_ISafeActivationService_GetData_Input_policy"
> >> />
> >>> <soap12:body use="literal" />
> >>> </wsdl:input>
> >>> -<wsdl:output>
> >>> <wsp:PolicyReference URI="
> >>>
> > #WSHttpBinding_ISafeActivationService_GetData_output_policy"
> >> />
> >>> <soap12:body use="literal" />
> >>> </wsdl:output>
> >>> </wsdl:operation>
> >>> -<wsdl:operation name="GetDataUsingDataContract">
> >>> <soap12:operation soapAction="
> >>>
> >>
[26]http://tempuri.org/ISafeActivationService/GetDataUsingDataContract
> >>> " style="document" />
> >>> -<wsdl:input>
> >>> <wsp:PolicyReference URI="
> >>>
> >>
> >
#WSHttpBinding_ISafeActivationService_GetDataUsingDataContract_Input_p
olicy
> >>> " />
> >>> <soap12:body use="literal" />
> >>> </wsdl:input>
> >>> -<wsdl:output>
> >>> <wsp:PolicyReference URI="
> >>>
> >>
> >
#WSHttpBinding_ISafeActivationService_GetDataUsingDataContract_output_
policy
> >
> >>
> >>> " />
> >>> <soap12:body use="literal" />
> >>> </wsdl:output>
> >>> </wsdl:operation>
> >>> </wsdl:binding>
> >>> -<wsdl:binding
name="BasicHttpBinding_ISafeActivationService"
> > type
> >> ="
> >>> tns:ISafeActivationService">
> >>> <soap:binding transport="
> > [27]http://schemas.xmlsoap.org/soap/http
> >> " />
> >>> -<wsdl:operation name="GetData">
> >>> <soap:operation soapAction="
> >>>
[28]http://tempuri.org/ISafeActivationService/GetData" style="
> >>> document" />
> >>> -<wsdl:input>
> >>> <soap:body use="literal" />
> >>> </wsdl:input>
> >>> -<wsdl:output>
> >>> <soap:body use="literal" />
> >>> </wsdl:output>
> >>> </wsdl:operation>
> >>> -<wsdl:operation name="GetDataUsingDataContract">
> >>> <soap:operation soapAction="
> >>>
> >>
[29]http://tempuri.org/ISafeActivationService/GetDataUsingDataContract
> >>> " style="document" />
> >>> -<wsdl:input>
> >>> <soap:body use="literal" />
> >>> </wsdl:input>
> >>> +<wsdl:output>
> >>> <soap:body use="literal" />
> >>> </wsdl:output>
> >>> </wsdl:operation>
> >>> </wsdl:binding>
> >>> -<wsdl:service name="SafeActivationService">
> >>> -<wsdl:port
name="WSHttpBinding_ISafeActivationService"
> > binding
> >> ="
> >>> tns:WSHttpBinding_ISafeActivationService">
> >>> <soap12:address location="
> >>>
[30]http://745kmiller/SafeActivationAPI/SafeActivation.svc" />
> >>> -<wsa10:EndpointReference>
> >>> <wsa10:Address>
> >>>
[31]http://745kmiller/SafeActivationAPI/SafeActivation.svc</
> >>> wsa10:Address>
> >>> -<Identity xmlns="
> >>>
[32]http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
> >>> <Dns>localhost</Dns>
> >>> </Identity>
> >>> </wsa10:EndpointReference>
> >>> </wsdl:port>
> >>> -<wsdl:port
name="BasicHttpBinding_ISafeActivationService"
> >> binding
> >>> ="tns:BasicHttpBinding_ISafeActivationService">
> >>> <soap:address location="
> >>>
[33]http://745kmiller/SafeActivationAPI/SafeActivation.svc/basic
> > "
> >> />
> >>> </wsdl:port>
> >>> </wsdl:service>
> >>> </wsdl:definitions>
> >>>
> >>>
> >>> Here is the log output
> >>>
> >>> HTTPAPI Ver 1.23 released 2008-04-24
> >>> OS/400 Ver V5R4M0
> >>>
> >>> New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819.
ProtLoc=0
> >>> http_persist_open(): entered
> >>> http_long_ParseURL(): entered
> >>> DNS resolver retrans: 2
> >>> DNS resolver retry : 2
> >>> DNS resolver options: x'00000136'
> >>> DNS default domain: PRI.COM
> >>> DNS server found: 172.20.20.93
> >>> http_persist_post(): entered
> >>> http_long_ParseURL(): entered
> >>> do_post(): entered
> >>> POST /SafeActivationAPI/SafeActivation.svc/basic HTTP/1.1
> >>> Host: 172.20.20.99
> >>> User-Agent: http-api/1.23
> >>> Content-Type: text/xml; charset=utf-8
> >>> SOAPAction:
[34]http://tempuri.org/ISafeActivationService/GetData
> >>> Expect: 100-continue
> >>> Content-Length: 291
> >>>
> >>>
> >>> recvresp(): entered
> >>> HTTP/1.1 100 Continue
> >>> Server: Microsoft-IIS/5.1
> >>> Date: Fri, 10 Sep 2010 19:33:10 GMT
> >>> X-Powered-By: ASP.NET
> >>>
> >>>
> >>> SetError() #13: HTTP/1.1 100 Continue
> >>> senddoc(): entered
> >>> <?xml version="1.0" encoding="iso-8859-1" standalone
> > ="no"?><SOAP:Envelope
> >>> xmlns:SOAP="[35]http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="
> >>> [36]http://tempuri.org/ISafeActivationService/"<SOAP :Body>
> > <tns:GetData>
> >>> <tns:value>7</tns:value>
</tns:GetData></SOAP:Body></SOAP:Envelope>
> >>> recvresp(): entered
> >>> HTTP/1.1 400 Bad Request
> >>> Server: Microsoft-IIS/5.1
> >>> Date: Fri, 10 Sep 2010 19:33:10 GMT
> >>> X-Powered-By: ASP.NET
> >>> X-AspNet-Version: 2.0.50727
> >>> Cache-Control: private
> >>> Content-Length: 0
> >>>
> >>>
> >>> SetError() #13: HTTP/1.1 400 Bad Request
> >>> recvdoc parms: identity 0
> >>> header_load_cookies() entered
> >>> recvdoc(): entered
> >>> SetError() #0:
> >>> SetError() #13: HTTP/1.1 400 Bad Request
> >>> http_close(): entered
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
----------------------------------------------------------------------
-
> >>> This is the FTPAPI mailing list. To unsubscribe, please go to:
> >>> [37]http://www.scottklement.com/mailman/listinfo/ftpapi
> >>>
----------------------------------------------------------------------
-
> >>>
> >>
----------------------------------------------------------------------
-
> >> This is the FTPAPI mailing list. To unsubscribe, please go to:
> >> [38]http://www.scottklement.com/mailman/listinfo/ftpapi
> >>
----------------------------------------------------------------------
-
> >>
> >>
> >>
> >>
> >>
> >>
> >>
----------------------------------------------------------------------
-
> >> This is the FTPAPI mailing list. To unsubscribe, please go to:
> >> [39]http://www.scottklement.com/mailman/listinfo/ftpapi
> >>
----------------------------------------------------------------------
-
> >
> >
----------------------------------------------------------------------
-
> > This is the FTPAPI mailing list. To unsubscribe, please go to:
> > [40]http://www.scottklement.com/mailman/listinfo/ftpapi
> >
----------------------------------------------------------------------
-
> >
> >
> >
> >
> >
> >
----------------------------------------------------------------------
-
> > This is the FTPAPI mailing list. To unsubscribe, please go to:
> > [41]http://www.scottklement.com/mailman/listinfo/ftpapi
> >
----------------------------------------------------------------------
-
> >
>
----------------------------------------------------------------------
-
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> [42]http://www.scottklement.com/mailman/listinfo/ftpapi
>
----------------------------------------------------------------------
-
>
--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a
criminal
offence. Please delete if obtained in error and email confirmation to
the sender.
References
1. http://sourceforge.net/projects/soapui/
2. http://tempuri.org/Imports
3. http://745kmiller/SafeActivationAPI/SafeActivation.svc?xsd=xsd0
4. http://tempuri.org/
5. http://745kmiller/SafeActivationAPI/SafeActivation.svc?xsd=xsd1
6. http://schemas.microsoft.com/2003/10/Serialization/
7. http://745kmiller/SafeActivationAPI/SafeActivation.svc?xsd=xsd2
8. http://schemas.datacontract.org/2004/07/SafeActivationServiceLibrary
9. http://745kmiller/
10. http://745kmiller/
11. http://www.soapui.org/
12. http://schemas.xmlsoap.org/soap/envelope/
13. http://tempuri.org/ISafeActivationService/
14. http://schemas.xmlsoap.org/soap/envelope/
15. http://tempuri.org/ISafeActivationService/
16. http://schemas.xmlsoap.org/soap/envelope/
17. http://tempuri.org/ISafeActivationService/
18. http://schemas.xmlsoap.org/soap/envelope/
19. http://tempuri.org/ISafeActivationService/
20. http://tempuri.org/ISafeActivationService/GetData
21. http://tempuri.org/ISafeActivationService/GetDataResponse
22. http://tempuri.org/ISafeActivationService/GetDataUsingDataContract
23. http://tempuri.org/ISafeActivationService/GetDataUsingDataContractResponse
24. http://schemas.xmlsoap.org/soap/http
25. http://tempuri.org/ISafeActivationService/GetData
26. http://tempuri.org/ISafeActivationService/GetDataUsingDataContract
27. http://schemas.xmlsoap.org/soap/http
28. http://tempuri.org/ISafeActivationService/GetData
29. http://tempuri.org/ISafeActivationService/GetDataUsingDataContract
30. http://745kmiller/SafeActivationAPI/SafeActivation.svc
31. http://745kmiller/SafeActivationAPI/SafeActivation.svc
32. http://schemas.xmlsoap.org/ws/2006/02/addressingidentity
33. http://745kmiller/SafeActivationAPI/SafeActivation.svc/basic
34. http://tempuri.org/ISafeActivationService/GetData
35. http://schemas.xmlsoap.org/soap/envelope/
36. http://tempuri.org/ISafeActivationService/
37. http://www.scottklement.com/mailman/listinfo/ftpapi
38. http://www.scottklement.com/mailman/listinfo/ftpapi
39. http://www.scottklement.com/mailman/listinfo/ftpapi
40. http://www.scottklement.com/mailman/listinfo/ftpapi
41. http://www.scottklement.com/mailman/listinfo/ftpapi
42. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------