10 Replies Latest reply on Aug 16, 2012 6:58 PM by 955933

    BusinessService error in msg parsing: xml was empty, didn't parse!

    955933
      Hi

      I'm trying to consuming a WebService implemented in PHP, the WS its internal

      http://192.168.2.15:81/project/service/ws.wsdl

      I created a BusinessService from that WSDL, but when i test the businessService through the sbconsole i get this

      <SOAP-ENV:Envelope      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
      <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
      <faultcode      xsi:type="xsd:string">SOAP-ENV:Client</faultcode>
      <faultactor      xsi:type="xsd:string"/>
      <faultstring      xsi:type="xsd:string">
      error in msg parsing:
      xml was empty, didn't parse!
      </faultstring>
      <detail      xsi:type="xsd:string"/>
      </SOAP-ENV:Fault>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>


      <con:metadata      xmlns:con="http://www.bea.com/wli/sb/test/config">
      <tran:headers      xsi:type="http:HttpResponseHeaders" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <tran:user-header      name="X-Powered-By" value="PHP/5.2.1"/>
      <tran:user-header      name="X-SOAP-Server" value="NuSOAP/0.9.5 (1.123)"/>
      <http:Connection>close</http:Connection>
      <http:Content-Length>689</http:Content-Length>
      <http:Content-Type>text/xml; charset=ISO-8859-1</http:Content-Type>
      <http:Date>Wed, 15 Aug 2012 14:55:28 GMT</http:Date>
      <http:Server>Apache/2.2.4 (Win32)</http:Server>
      </tran:headers>
      <tran:response-code      xmlns:tran="http://www.bea.com/wli/sb/transports">2</tran:response-code>
      <tran:response-message      xmlns:tran="http://www.bea.com/wli/sb/transports">Internal Server Error</tran:response-message>
      <tran:encoding      xmlns:tran="http://www.bea.com/wli/sb/transports">ISO-8859-1</tran:encoding>
      <http:http-response-code      xmlns:http="http://www.bea.com/wli/sb/transports/http">500</http:http-response-code>
      </con:metadata>

      -- Added
      I forgot to say that the WS works well when i tested with SoapUI
      --
      Any help would be apreciated.

      Thanks

      Edited by: user4159641 on 15-ago-2012 8:00
        • 1. Re: BusinessService error in msg parsing: xml was empty, didn't parse!
          955894
          Hi,

          1. You seem to be getting 500 error, which looks like issue at server side.
          2. Can you download the wsdl and try to create business service.

          Regards,
          Ravi
          • 2. Re: BusinessService error in msg parsing: xml was empty, didn't parse!
            955933
            Yes, i can do that, i created the business service from that WSDL, i also copied the WSDL and put it in my project to create the business service, but the same error appear.

            Thanks for your reply
            • 3. Re: BusinessService error in msg parsing: xml was empty, didn't parse!
              955894
              Is it possible to share your wsdl file?
              • 4. Re: BusinessService error in msg parsing: xml was empty, didn't parse!
                955933
                <?xml version="1.0" encoding="ISO-8859-1"?>
                <definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.domain.com/portalSitiMapa/sitidataTcc/wsSitidataEstandar" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.domain.com/portalSitiMapa/sitidataTcc/wsSitidataEstandar">
                <types>
                <xsd:schema targetNamespace="http://www.domain.com/portalSitiMapa/sitidataTcc/wsSitidataEstandar">
                <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
                <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
                </xsd:schema>
                </types>
                <message name="enriquecerXmlLotesRequest">
                <part name="xmlEnvio" type="xsd:string" />
                <part name="usuario" type="xsd:string" />
                <part name="clave" type="xsd:string" />
                <part name="aproxim" type="xsd:string" /></message>
                <message name="enriquecerXmlLotesResponse">
                <part name="return" type="xsd:string" /></message>
                <portType name="wsSitidataEstandarPortType">
                <operation name="enriquecerXmlLotes">
                <input message="tns:enriquecerXmlLotesRequest"/>
                <output message="tns:enriquecerXmlLotesResponse"/>
                </operation>
                </portType>
                <binding name="wsSitidataEstandarBinding" type="tns:wsSitidataEstandarPortType">
                <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
                <operation name="enriquecerXmlLotes">
                <soap:operation soapAction="http://www.domain.com/project/servicio/wsStandar.php/enriquecerXmlLotes" style="rpc"/>
                <input><soap:body use="encoded" namespace="http://www.domain.com/project/servicio/wsStandar.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
                <output><soap:body use="encoded" namespace="http://www.domain.com/project/servicio/wsStandar.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
                </operation>
                </binding>
                <service name="wsSitidataEstandar">
                <port name="wsSitidataEstandarPort" binding="tns:wsSitidataEstandarBinding">
                <soap:address location="http://www.domain.com/project/servicio/wsStandar.php"/>
                </port>
                </service>
                </definitions>

                Edited by: user4159641 on 15-ago-2012 9:14

                Edited by: user4159641 on 15-ago-2012 9:14
                • 5. Re: BusinessService error in msg parsing: xml was empty, didn't parse!
                  955894
                  1. When you import this wsdl into eclipse its giving few errors and its not getting detected to create Business Service.

                  2. Even i am not able to import into SOAP UI. The below URL seems not available.
                  http://www.domain.com/project/servicio/wsStandar.php
                  • 6. Re: BusinessService error in msg parsing: xml was empty, didn't parse!
                    955933
                    that's because its an internal WebService. but i found the external one. here's the address

                    http://www.sitimapa.com/webservice/sitidata/wsSitidataEstandar.php?wsdl
                    • 7. Re: BusinessService error in msg parsing: xml was empty, didn't parse!
                      955894
                      Using the new URL i am able to createBusiness Service, i have pasted the content of the wsdl generated.

                      wsSitidataEstandar.php.wsdl

                      <definitions targetNamespace="www.sitimapa.com/webservice/sitidata/wsSitidataEstandar" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="www.sitimapa.com/webservice/sitidata/wsSitidataEstandar" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
                      <types>
                      <xsd:schema targetNamespace="www.sitimapa.com/webservice/sitidata/wsSitidataEstandar">
                      <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
                      <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>
                      <xsd:complexType name="arrayData">
                      <xsd:complexContent>
                      <xsd:restriction base="SOAP-ENC:Array">
                      <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:string[]" xmlns:wsdl1="http://schemas.xmlsoap.org/wsdl/"/>
                      </xsd:restriction>
                      </xsd:complexContent>
                      </xsd:complexType>
                      <xsd:complexType name="headerArray">
                      <xsd:all>
                      <xsd:element name="key" type="xsd:string"/>
                      <xsd:element name="addressOrCoordinate" type="xsd:string"/>
                      </xsd:all>
                      </xsd:complexType>
                      <xsd:complexType name="arrayOfString">
                      <xsd:complexContent>
                      <xsd:restriction base="SOAP-ENC:Array">
                      <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:headerArray[]" xmlns:wsdl1="http://schemas.xmlsoap.org/wsdl/"/>
                      </xsd:restriction>
                      </xsd:complexContent>
                      </xsd:complexType>
                      <xsd:complexType name="sequence">
                      <xsd:all>
                      <xsd:element name="key" type="xsd:string"/>
                      <xsd:element name="sequence" type="xsd:string"/>
                      </xsd:all>
                      </xsd:complexType>
                      <xsd:complexType name="arrayOfSequence">
                      <xsd:complexContent>
                      <xsd:restriction base="SOAP-ENC:Array">
                      <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:sequence[]" xmlns:wsdl1="http://schemas.xmlsoap.org/wsdl/"/>
                      </xsd:restriction>
                      </xsd:complexContent>
                      </xsd:complexType>
                      <xsd:complexType name="itinerary">
                      <xsd:all>
                      <xsd:element name="text" type="xsd:string"/>
                      <xsd:element name="cx" type="xsd:string"/>
                      <xsd:element name="cy" type="xsd:string"/>
                      </xsd:all>
                      </xsd:complexType>
                      <xsd:complexType name="arrayOfItinerary">
                      <xsd:complexContent>
                      <xsd:restriction base="SOAP-ENC:Array">
                      <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:itinerary[]" xmlns:wsdl1="http://schemas.xmlsoap.org/wsdl/"/>
                      </xsd:restriction>
                      </xsd:complexContent>
                      </xsd:complexType>
                      <xsd:complexType name="invalid">
                      <xsd:all>
                      <xsd:element name="key" type="xsd:string"/>
                      <xsd:element name="address" type="xsd:string"/>
                      </xsd:all>
                      </xsd:complexType>
                      <xsd:complexType name="arrayOfInvalid">
                      <xsd:complexContent>
                      <xsd:restriction base="SOAP-ENC:Array">
                      <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:invalid[]" xmlns:wsdl1="http://schemas.xmlsoap.org/wsdl/"/>
                      </xsd:restriction>
                      </xsd:complexContent>
                      </xsd:complexType>
                      <xsd:complexType name="arrayresult">
                      <xsd:all>
                      <xsd:element name="sequence" type="tns:arrayOfSequence"/>
                      <xsd:element name="itinerary" type="tns:arrayOfItinerary"/>
                      <xsd:element name="invalid" type="tns:arrayOfInvalid"/>
                      <xsd:element name="message" type="xsd:string"/>
                      <xsd:element name="totalTime" type="xsd:string"/>
                      <xsd:element name="totalDistanceCalculated" type="xsd:string"/>
                      </xsd:all>
                      </xsd:complexType>
                      <xsd:complexType name="arrayresult2">
                      <xsd:all>
                      <xsd:element name="geo" type="tns:arrayData"/>
                      <xsd:element name="message" type="xsd:string"/>
                      </xsd:all>
                      </xsd:complexType>
                      </xsd:schema>
                      </types>
                      <message name="enriquecerRequest">
                      <part name="direccion" type="xsd:string"/>
                      <part name="ciudad" type="xsd:string"/>
                      <part name="barrio" type="xsd:string"/>
                      <part name="usuario" type="xsd:string"/>
                      <part name="clave" type="xsd:string"/></message>
                      <message name="enriquecerResponse">
                      <part name="return" type="tns:arrayresult2"/></message>
                      <message name="enriquecerAsistidoRequest">
                      <part name="direccion" type="xsd:string"/>
                      <part name="ciudad" type="xsd:string"/>
                      <part name="barrio" type="xsd:string"/>
                      <part name="usuario" type="xsd:string"/>
                      <part name="clave" type="xsd:string"/></message>
                      <message name="enriquecerAsistidoResponse">
                      <part name="return" type="tns:arrayresult2"/></message>
                      <message name="enriquecerXmlLotesRequest">
                      <part name="xmlEnvio" type="xsd:string"/>
                      <part name="usuario" type="xsd:string"/>
                      <part name="clave" type="xsd:string"/></message>
                      <message name="enriquecerXmlLotesResponse">
                      <part name="return" type="xsd:string"/></message>
                      <portType name="wsSitidataEstandarPortType">
                      <operation name="enriquecer">
                      <input message="tns:enriquecerRequest"/>
                      <output message="tns:enriquecerResponse"/>
                      </operation>
                      <operation name="enriquecerAsistido">
                      <input message="tns:enriquecerAsistidoRequest"/>
                      <output message="tns:enriquecerAsistidoResponse"/>
                      </operation>
                      <operation name="enriquecerXmlLotes">
                      <input message="tns:enriquecerXmlLotesRequest"/>
                      <output message="tns:enriquecerXmlLotesResponse"/>
                      </operation>
                      </portType>
                      <binding name="wsSitidataEstandarBinding" type="tns:wsSitidataEstandarPortType">
                      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
                      <operation name="enriquecer">
                      <soap:operation soapAction="http://www.sitimapa.com/webservice/sitidata/wsSitidataEstandar.php/enriquecer" style="rpc"/>
                      <input><soap:body use="encoded" namespace="www.sitimapa.com/webservice/sitidata/wsSitidataEstandar.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
                      <output><soap:body use="encoded" namespace="www.sitimapa.com/webservice/sitidata/wsSitidataEstandar.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
                      </operation>
                      <operation name="enriquecerAsistido">
                      <soap:operation soapAction="http://www.sitimapa.com/webservice/sitidata/wsSitidataEstandar.php/enriquecerAsistido" style="rpc"/>
                      <input><soap:body use="encoded" namespace="www.sitimapa.com/webservice/sitidata/wsSitidataEstandar.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
                      <output><soap:body use="encoded" namespace="www.sitimapa.com/webservice/sitidata/wsSitidataEstandar.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
                      </operation>
                      <operation name="enriquecerXmlLotes">
                      <soap:operation soapAction="http://www.sitimapa.com/webservice/sitidata/wsSitidataEstandar.php/enriquecerXmlLotes" style="rpc"/>
                      <input><soap:body use="encoded" namespace="www.sitimapa.com/webservice/sitidata/wsSitidataEstandar.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
                      <output><soap:body use="encoded" namespace="www.sitimapa.com/webservice/sitidata/wsSitidataEstandar.php" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
                      </operation>
                      </binding>
                      <service name="wsSitidataEstandar">
                      <port name="wsSitidataEstandarPort" binding="tns:wsSitidataEstandarBinding">
                      <soap:address location="http://www.sitimapa.com/webservice/sitidata/wsSitidataEstandar.php"/>
                      </port>
                      </service>
                      </definitions>
                      • 8. Re: BusinessService error in msg parsing: xml was empty, didn't parse!
                        955933
                        Hi,

                        Did you test it? the problem is when i consume that webservice. i can create the business service with no problem.
                        • 9. Re: BusinessService error in msg parsing: xml was empty, didn't parse!
                          vladodias
                          That's a hard one... I'm guessing php side is not understanding the way OSB is sending data... Try and switch between port and binding when you create your business service and see if that makes some difference...

                          It is a good thing you have the SoapUI working, then you can compare... It is easy to see the raw data in SoapUI, but not that easy in SB Test Console, you'll have to dig there and see if you can spot some difference... At the very end you may need some tool to see what it's being sent at transport level...

                          Hope this helps...

                          Cheers,
                          Vlad

                          It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts)
                          https://forums.oracle.com/forums/ann.jspa?annID=893
                          1 person found this helpful
                          • 10. Re: BusinessService error in msg parsing: xml was empty, didn't parse!
                            955933
                            Thank you for all your replys, i found the problem, now is working just fine.

                            I had to activate "HTTPS Forward" in my BusinessService.