Announcement Announcement Module
No announcement yet.
Random NullPointerException when calling a web service running on Oracle ESB Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Random NullPointerException when calling a web service running on Oracle ESB

    I have been using spring ws successfully for the past months, but now I am trying to call a web service running on Oracle SOA Suite (were using the Enterprise Service Bus feature) and I keep getting a NPE???

    The only thing that is different from some more straight forward web services (where everything is in one WSDL) is that their WSDL import's another WSDL that defines my XML Schema and other things.

    I have tried stepping through the spring ws 1.0.3 codebase and can't seem to figure out what I'm doing wrong. I can even execute the web service on the ESB using SoapUI, but not using Spring WebServiceClient??

    Any help is very appreciated!

    Test SOAP message being sent via WebServiceClientTemplate:

    <con:publish-all-model-years requested-by="?">
                <con:recipient name="?"/>

    Here is the WSDL that ESB is publishing that includes another WSDL (other WSDL being imported is below):
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <definitions targetNamespace="" xmlns="" xmlns:tns="" xmlns:ws="" xmlns:http="" xmlns:plt="" xmlns:esb="" xmlns:xs="" xmlns:soap="" xmlns:wsdl="" xmlns:import="">
        <import namespace="" location="http://day-int2.edmunds.hq:8889/esb/slide/ESB_Projects/VDM_VdmEsb/Vdm_ControlRouter.wsdl"/>
        <binding name="__esb_ControlRouter_execute_ppt" type="tns:execute_ppt">
            <operation name="execute">
          <esb:operation event-name="Vdm.ControlRouter.execute"/>
        <binding name="__soap_ControlRouter_execute_ppt" type="tns:execute_ppt">
            <soap:binding xmlns:soap="" style="document" transport=""/>
            <operation name="execute">
                <soap:operation xmlns:soap="" style="document" soapAction="execute"/>
                    <soap:body xmlns:soap="" use="literal"/>
        <service name="execute_pptService">
            <port name="__soap_ControlRouter_execute_ppt" binding="tns:__soap_ControlRouter_execute_ppt">
                <soap:address xmlns:soap="" location=""/>
            <port name="__esb_ControlRouter_execute_ppt" binding="tns:__esb_ControlRouter_execute_ppt">
        <plt:partnerLinkType name="execute_pptLT">
            <plt:role name="execute_pptProvider">
                <plt:portType name="tns:execute_ppt"/>
    Imported WSDL:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <definitions name="ControlRouter" targetNamespace="" xmlns="" xmlns:tns="" xmlns:inp1="">
          <schema xmlns="">
            <import namespace="" schemaLocation="vehicle-publish-control.xsd"/>
        <message name="vehicle-publish-control_request">
            <part name="vehicle-publish-control" element="inp1:vehicle-publish-control"/>
        <portType name="execute_ppt">
            <operation name="execute">
                <input message="tns:vehicle-publish-control_request"/>

  • #2
    Any Help?

    If anyone has any insight into why the Spring WebServiceTemplate would have issues communicating with a web service described above, etc it would be greatly appreciated!



    • #3
      Figured it out!

      After looking at the HTTP MEssage headers using TCP/IP Monitor I saw that SOAP UI was placing a header called SOAPAction: "execute" in the HTTP Request so I used this method on the webservice template which allows you to set this header value manually:

      webServiceTemplate.sendSourceAndReceive(webServiceTemplate.getDefaultUri(),source2, new WebServiceMessageCallback(){
                  public void doWithMessage(WebServiceMessage message) throws IOException, TransformerException {
              }, new SourceExtractor(){
                  public Object extractData(Source source) throws IOException, TransformerException {
                      return null;  //To change body of implemented methods use File | Settings | File Templates.