4 Replies Latest reply: Dec 11, 2012 2:10 PM by 969358 RSS

    BEA-380000 Bad Request while calling ASMX

    969358
      There is an asmx web service published in IIS 7.5 which is working correctlly when invited from other C# aplication but I am getting "BEA-380000: Bad Request" while I am testing the proxyservice from OSB Console.
      In OSB I did the same basic steps (WSDL referenced by BusinessService referenced by ProxyService) I have done for other projects.
      Is there some issue or specific configuration in OSB that I should worry about when I am using ASMX or IIS 7?

      The wsdl from my asmx service is:
      <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.libertyseguros.com.br" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.libertyseguros.com.br">
      <wsdl:types>
      <s:schema elementFormDefault="qualified" targetNamespace="http://www.libertyseguros.com.br">
      <s:element name="ObterDadosCliente">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="usuario" type="s:string"/>
      <s:element minOccurs="1" maxOccurs="1" name="ativarTrace" type="s:boolean"/>
      <s:element minOccurs="0" maxOccurs="1" name="xmlRequest" type="s:string"/>
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:element name="ObterDadosClienteResponse">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="ObterDadosClienteResult" type="s:string"/>
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:schema>
      </wsdl:types>
      <wsdl:message name="ObterDadosClienteSoapIn">
      <wsdl:part name="parameters" element="tns:ObterDadosCliente"/>
      </wsdl:message>
      <wsdl:message name="ObterDadosClienteSoapOut">
      <wsdl:part name="parameters" element="tns:ObterDadosClienteResponse"/>
      </wsdl:message>
      <wsdl:portType name="AplicacaoExemploIISoap">
      <wsdl:operation name="ObterDadosCliente">
      <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Dado um código de cliente, retorna seus dados.</wsdl:documentation>
      <wsdl:input message="tns:ObterDadosClienteSoapIn"/>
      <wsdl:output message="tns:ObterDadosClienteSoapOut"/>
      </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="AplicacaoExemploIISoap" type="tns:AplicacaoExemploIISoap">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="ObterDadosCliente">
      <soap:operation soapAction="http://www.libertyseguros.com.br/ObterDadosCliente" style="document"/>
      <wsdl:input>
      <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
      <soap:body use="literal"/>
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
      <wsdl:binding name="AplicacaoExemploIISoap12" type="tns:AplicacaoExemploIISoap">
      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="ObterDadosCliente">
      <soap12:operation soapAction="http://www.libertyseguros.com.br/ObterDadosCliente" style="document"/>
      <wsdl:input>
      <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
      <soap12:body use="literal"/>
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="AplicacaoExemploII">
      <wsdl:port name="AplicacaoExemploIISoap" binding="tns:AplicacaoExemploIISoap">
      <soap:address location="http://localhost/testeLibWs/AplicacaoExemploII.asmx"/>
      </wsdl:port>
      <wsdl:port name="AplicacaoExemploIISoap12" binding="tns:AplicacaoExemploIISoap12">
      <soap12:address location="http://localhost/testeLibWs/AplicacaoExemploII.asmx"/>
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>

      In the tester console my request is:

      <soapenv:Envelope      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Header      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      </soap:Header>
      <soapenv:Body>
      <lib:ObterDadosCliente      xmlns:lib="http://www.libertyseguros.com.br">
      <!--Optional:-->
      <lib:usuario>string</lib:usuario>
      <lib:ativarTrace>false</lib:ativarTrace>
      <!--Optional:-->
      <lib:xmlRequest>
      <ObterDadosClienteRequest>
      <CodigoCliente>2</CodigoCliente>
      </ObterDadosClienteRequest>
      </lib:xmlRequest>
      </lib:ObterDadosCliente>
      </soapenv:Body>
      </soapenv:Envelope>

      And the answer is:
      <soapenv:Envelope      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Body>
      <soapenv:Fault>
      <faultcode>soapenv:Server</faultcode>
      <faultstring>BEA-380000: Bad Request</faultstring>
      <detail>
      <con:fault      xmlns:con="http://www.bea.com/wli/sb/context">
      <con:errorCode>BEA-380000</con:errorCode>
      <con:reason>Bad Request</con:reason>
      <con:location>
      <con:node>RouteTo_bs</con:node>
      <con:path>response-pipeline</con:path>
      </con:location>
      </con:fault>
      </detail>
      </soapenv:Fault>
      </soapenv:Body>
      </soapenv:Envelope>
        • 1. Re: BEA-380000 Bad Request while calling ASMX
          vladodias
          Hi,

          OSB should be able to call asmx services with no problems...

          Did the wsdl change after business service was created?

          Try to execute the business service directly from test console and see if you get a more useful error message... BEA-380000: Bad Request is pretty generic...

          Cheers,
          Vlad
          • 2. Re: BEA-380000 Bad Request while calling ASMX
            Eric Elzinga
            can you try putting on the 'Use Chunked Streaming Mode' option on the business service and see what it does ?
            http://www.xenta.nl/blog/2011/12/06/oracle-service-bus-request-entity-too-large/

            it's worth a try
            • 3. Re: BEA-380000 Bad Request while calling ASMX
              Patrick Taylor
              The input request you are using is definitely not compliant with the WSDL and hence the error.

              I tried to use the WSDL in soapUI and when I validate your request with the WSDL, it fails with the below error:

              line -1: Element Envelope@http://schemas.xmlsoap.org/soap/envelope/ is not a valid Envelope@http://www.w3.org/2003/05/soap-envelope document or a valid substitution.

              The namespace is incorrect. You can try to create a new sample request using soapUI that is WSDL compliant.

              Thanks,
              Patrick
              • 4. Re: BEA-380000 Bad Request while calling ASMX
                969358
                Thanks to everyone. Definitly every tips have helped me a lot to find my own mistakes and learn more about OSB. In that case, I was passing the last parameter wrongly. It was expected to be enclosed by CDATA[] in reason of the characteres "<>". When I call from C# it is not required but Patrick is right when he said that there is an unconformity with W3.