Jump to content

SOAP and WSDL response error - Segmentation fault


tuberider

Recommended Posts

Hi,

 

Help would be very appreciative

 

I am doing some preliminary testing for future projects.  A company we are working with supplied us with a wsdl file to communicate with their system.

 

I want to use PHP to run functions in the wsdl file but I got stuck after calling a function and I get no response back.  Below is my test snippet PHP code.  Below the PHP code is the wsdl file (also attached change the extension from .txt to .wsdl before using it).

 

When I run the php code from command line (linux server) I get a "Segmentation fault" back.  I am assuming that the error is coming from the wsdl file.  I am not high fly on wsdl code and I would not really know what I'm doing if I started chopping and dicing the wsdl file.

 

 

<?php

$client = new SoapClient("http://172.21.1.24:7070/comactivity/axis2services/OrderEntryWebService?wsdl/");

//if the wsdl exist locally use

//$client = new SoapClient("file.wsdl");

 

//echo var_export($client->__getFunctions(),true);

 

$arr_head=array(

  "cuno"  =>"1234",

  "ortp"  =>"ORD",

  "faci"  =>"M00",

  "rldt"  =>"20110811"

);

 

try {

  $arr = $client->__soapCall("addBatchHead", $arr_head);

 

}

catch (SoapFault $exception){

  echo $exception;

}

?>

 

 

 

 

 

=========== WSDL file within these tags =============

 

<?xml version="1.0" encoding="utf-16"?>

<wsdl:definitions xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns="http://services.web" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://services.web" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

  <wsdl:documentation>Order Entry Web Service</wsdl:documentation>

  <wsdl:types>

    <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://services.web">

      <xs:element name="addBatchHead">

        <xs:complexType>

          <xs:sequence>

            <xs:element minOccurs="0" name="cuno" nillable="true" type="xs:string" />

            <xs:element minOccurs="0" name="ortp" nillable="true" type="xs:string" />

            <xs:element minOccurs="0" name="faci" nillable="true" type="xs:string" />

            <xs:element minOccurs="0" name="rldt" nillable="true" type="xs:string" />

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element name="addBatchHeadResponse">

        <xs:complexType>

          <xs:sequence>

            <xs:element minOccurs="0" name="addBatchHeadReturn" nillable="true" type="xs:string" />

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element name="addBatchLine">

        <xs:complexType>

          <xs:sequence>

            <xs:element minOccurs="0" name="tempOrno" nillable="true" type="xs:string" />

            <xs:element minOccurs="0" name="itno" nillable="true" type="xs:string" />

            <xs:element minOccurs="0" name="orqt" nillable="true" type="xs:string" />

            <xs:element minOccurs="0" name="whlo" nillable="true" type="xs:string" />

            <xs:element minOccurs="0" name="dlsp" nillable="true" type="xs:string" />

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element name="addBatchLineResponse">

        <xs:complexType>

          <xs:sequence>

            <xs:element minOccurs="0" name="addBatchLineReturn" nillable="true" type="xs:string" />

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element name="confirm">

        <xs:complexType>

          <xs:sequence>

            <xs:element minOccurs="0" name="tempOrno" nillable="true" type="xs:string" />

          </xs:sequence>

        </xs:complexType>

      </xs:element>

      <xs:element name="confirmResponse">

        <xs:complexType>

          <xs:sequence>

            <xs:element minOccurs="0" name="confirmReturn" nillable="true" type="xs:string" />

          </xs:sequence>

        </xs:complexType>

      </xs:element>

    </xs:schema>

  </wsdl:types>

  <wsdl:message name="addBatchLineRequest">

    <wsdl:part name="parameters" element="ns:addBatchLine" />

  </wsdl:message>

  <wsdl:message name="confirmRequest">

    <wsdl:part name="parameters" element="ns:confirm" />

  </wsdl:message>

  <wsdl:message name="confirmResponse">

    <wsdl:part name="parameters" element="ns:confirmResponse" />

  </wsdl:message>

  <wsdl:message name="addBatchHeadResponse">

    <wsdl:part name="parameters" element="ns:addBatchHeadResponse" />

  </wsdl:message>

  <wsdl:message name="addBatchLineResponse">

    <wsdl:part name="parameters" element="ns:addBatchLineResponse" />

  </wsdl:message>

  <wsdl:message name="addBatchHeadRequest">

    <wsdl:part name="parameters" element="ns:addBatchHead" />

  </wsdl:message>

  <wsdl:portType name="OrderEntryWebServicePortType">

    <wsdl:operation name="addBatchLine">

      <wsdl:input wsaw:Action="urn:addBatchLine" message="ns:addBatchLineRequest" />

      <wsdl:output wsaw:Action="urn:addBatchLineResponse" message="ns:addBatchLineResponse" />

    </wsdl:operation>

    <wsdl:operation name="addBatchHead">

      <wsdl:input wsaw:Action="urn:addBatchHead" message="ns:addBatchHeadRequest" />

      <wsdl:output wsaw:Action="urn:addBatchHeadResponse" message="ns:addBatchHeadResponse" />

    </wsdl:operation>

    <wsdl:operation name="confirm">

      <wsdl:input wsaw:Action="urn:confirm" message="ns:confirmRequest" />

      <wsdl:output wsaw:Action="urn:confirmResponse" message="ns:confirmResponse" />

    </wsdl:operation>

  </wsdl:portType>

  <wsdl:binding name="OrderEntryWebServiceHttpBinding" type="ns:OrderEntryWebServicePortType">

    <http:binding verb="POST" />

    <wsdl:operation name="addBatchLine">

      <http:operation location="OrderEntryWebService/addBatchLine" />

      <wsdl:input>

        <mime:content part="addBatchLine" type="text/xml" />

      </wsdl:input>

      <wsdl:output>

        <mime:content part="addBatchLine" type="text/xml" />

      </wsdl:output>

    </wsdl:operation>

    <wsdl:operation name="addBatchHead">

      <http:operation location="OrderEntryWebService/addBatchHead" />

      <wsdl:input>

        <mime:content part="addBatchHead" type="text/xml" />

      </wsdl:input>

      <wsdl:output>

        <mime:content part="addBatchHead" type="text/xml" />

      </wsdl:output>

    </wsdl:operation>

    <wsdl:operation name="confirm">

      <http:operation location="OrderEntryWebService/confirm" />

      <wsdl:input>

        <mime:content part="confirm" type="text/xml" />

      </wsdl:input>

      <wsdl:output>

        <mime:content part="confirm" type="text/xml" />

      </wsdl:output>

    </wsdl:operation>

  </wsdl:binding>

  <wsdl:binding name="OrderEntryWebServiceSoap11Binding" type="ns:OrderEntryWebServicePortType">

    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="addBatchLine">

      <soap:operation soapAction="urn:addBatchLine" style="document" />

      <wsdl:input>

        <soap:body use="literal" />

      </wsdl:input>

      <wsdl:output>

        <soap:body use="literal" />

      </wsdl:output>

    </wsdl:operation>

    <wsdl:operation name="addBatchHead">

      <soap:operation soapAction="urn:addBatchHead" style="document" />

      <wsdl:input>

        <soap:body use="literal" />

      </wsdl:input>

      <wsdl:output>

        <soap:body use="literal" />

      </wsdl:output>

    </wsdl:operation>

    <wsdl:operation name="confirm">

      <soap:operation soapAction="urn:confirm" 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="OrderEntryWebServiceSoap12Binding" type="ns:OrderEntryWebServicePortType">

    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="addBatchLine">

      <soap12:operation soapAction="urn:addBatchLine" style="document" />

      <wsdl:input>

        <soap12:body use="literal" />

      </wsdl:input>

      <wsdl:output>

        <soap12:body use="literal" />

      </wsdl:output>

    </wsdl:operation>

    <wsdl:operation name="addBatchHead">

      <soap12:operation soapAction="urn:addBatchHead" style="document" />

      <wsdl:input>

        <soap12:body use="literal" />

      </wsdl:input>

      <wsdl:output>

        <soap12:body use="literal" />

      </wsdl:output>

    </wsdl:operation>

    <wsdl:operation name="confirm">

      <soap12:operation soapAction="urn:confirm" 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="OrderEntryWebService">

    <wsdl:port name="OrderEntryWebServiceHttpEndpoint" binding="ns:OrderEntryWebServiceHttpBinding">

      <http:address location="http://172.21.1.24:7070/comactivity/axis2services/OrderEntryWebService/" />

    </wsdl:port>

    <wsdl:port name="OrderEntryWebServiceHttpSoap12Endpoint" binding="ns:OrderEntryWebServiceSoap12Binding">

      <soap12:address location="http://172.21.1.24:7070/comactivity/axis2services/OrderEntryWebService/" />

    </wsdl:port>

    <wsdl:port name="OrderEntryWebService" binding="ns:OrderEntryWebServiceSoap11Binding">

      <soap:address location="http://172.21.1.24:7070/comactivity/axis2services/OrderEntryWebService/" />

    </wsdl:port>

  </wsdl:service>

</wsdl:definitions>

 

============== End WSDL file ===================

 

 

Thank you

 

/Martin

 

[attachment deleted by admin]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.