How to solve error while consuming WWEx webservice? - web-services

i am trying to consume webservice to get freight rate from webserivce "http://www.wwexship.com/webServices/services/FreightShipmentQuote?wsdl" and it is giving an error that "Web service operation getShipmentSimpleQuote with parameters {....} can not be found". whereas i am providing valid loginid,password, licensekey,accountnumber and other required details.
please suggest me how to consume this webservice?
wsdl file-
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.wwexship.com" xmlns:impl="http://www.wwexship.com" xmlns:intf="http://www.wwexship.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.wwexship.com" elementFormDefault="qualified">
<complexType name="AuthenticationToken">
<sequence>
<element name="loginId" nillable="true" type="xsd:string"/>
<element name="password" nillable="true" type="xsd:string"/>
<element name="licenseKey" nillable="true" type="xsd:string"/>
<element name="accountNumber" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<element name="AuthenticationToken" type="impl:AuthenticationToken" maxOccurs="1"/>
<complexType name="QuoteLineItem">
<sequence>
<element name="nmfcClass" nillable="true" type="xsd:string"/>
<element name="weight" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfQuoteLineItem">
<sequence>
<element name="lineItem" nillable="true" type="impl:QuoteLineItem" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="FreightShipmentQuoteRequest">
<sequence>
<element name="senderCity" nillable="true" type="xsd:string"/>
<element name="senderState" nillable="true" type="xsd:string"/>
<element name="senderZip" nillable="true" type="xsd:string"/>
<element name="receiverCity" nillable="true" type="xsd:string"/>
<element name="receiverState" nillable="true" type="xsd:string"/>
<element name="receiverZip" nillable="true" type="xsd:string"/>
<element name="lineItems" nillable="true" type="impl:ArrayOfQuoteLineItem"/>
<element name="hazmatShipment" nillable="true" type="xsd:string"/>
<element name="insidePickup" nillable="true" type="xsd:string"/>
<element name="liftgatePickup" nillable="true" type="xsd:string"/>
<element name="residentialPickup" nillable="true" type="xsd:string"/>
<element name="tradeshowPickup" nillable="true" type="xsd:string"/>
<element name="constructionSitePickup" nillable="true" type="xsd:string"/>
<element name="insideDelivery" nillable="true" type="xsd:string"/>
<element name="liftgateDelivery" nillable="true" type="xsd:string"/>
<element name="residentialDelivery" nillable="true" type="xsd:string"/>
<element name="tradeshowDelivery" nillable="true" type="xsd:string"/>
<element name="constructionSiteDelivery" nillable="true" type="xsd:string"/>
<element name="notifyBeforeDelivery" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<element name="freightShipmentQuoteRequest" type="impl:FreightShipmentQuoteRequest"/>
<complexType name="ErrorDescription">
<sequence>
<element name="errorDescription" nillable="true" type="xsd:string" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="CarrierQuoteResult">
<sequence>
<element name="carrierName" nillable="true" type="xsd:string"/>
<element name="carrierSCAC" nillable="true" type="xsd:string"/>
<element name="totalPrice" nillable="true" type="xsd:string"/>
<element name="transitDays" nillable="true" type="xsd:string"/>
<element name="interline" nillable="true" type="xsd:string"/>
<element name="guaranteedService" nillable="true" type="xsd:string"/>
<element name="highCostDeliveryShipment" nillable="true" type="xsd:string"/>
<element name="nmfcRequired" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfCarrierQuoteResult">
<sequence>
<element name="carrierQuoteResult" nillable="true" type="impl:CarrierQuoteResult" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="FreightShipmentQuoteResponse">
<sequence>
<element name="responseStatusCode" nillable="true" type="xsd:string"/>
<element name="responseStatusDescription" nillable="true" type="xsd:string"/>
<element name="errorDescriptions" nillable="true" type="impl:ErrorDescription"/>
<element name="quoteResults" nillable="true" type="impl:ArrayOfCarrierQuoteResult"/>
</sequence>
</complexType>
<element name="freightShipmentQuoteResponse" type="impl:FreightShipmentQuoteResponse"/>
</schema>
</wsdl:types>
<wsdl:message name="getShipmentSimpleQuoteResponse">
<wsdl:part name="freightShipmentQuoteResponse" element="impl:freightShipmentQuoteResponse"/>
</wsdl:message>
<wsdl:message name="FreightShipmentQuoteRequestHeaders">
<wsdl:part name="authenticationToken" element="impl:AuthenticationToken"/>
</wsdl:message>
<wsdl:message name="getShipmentSimpleQuoteRequest">
<wsdl:part name="freightShipmentQuoteRequest" element="impl:freightShipmentQuoteRequest"/>
</wsdl:message>
<wsdl:portType name="FreightShipmentQuote">
<wsdl:operation name="getShipmentSimpleQuote" parameterOrder="freightShipmentQuoteRequest">
<wsdl:input name="getShipmentSimpleQuoteRequest" message="impl:getShipmentSimpleQuoteRequest"/>
<wsdl:output name="getShipmentSimpleQuoteResponse" message="impl:getShipmentSimpleQuoteResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="FreightShipmentQuoteSoapBinding" type="impl:FreightShipmentQuote">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getShipmentSimpleQuote">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getShipmentSimpleQuoteRequest">
<wsdlsoap:body use="literal"/>
<wsdlsoap:header message="impl:FreightShipmentQuoteRequestHeaders" part="authenticationToken" use="literal">
</wsdlsoap:header>
</wsdl:input>
<wsdl:output name="getShipmentSimpleQuoteResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="FreightShipmentQuoteService">
<wsdl:port name="FreightShipmentQuote" binding="impl:FreightShipmentQuoteSoapBinding">
<wsdlsoap:address location="http://www.wwexship.com/webServices/services/FreightShipmentQuote"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
code that calls webservice is-
<!--- items data --->
<cfset items = arrayNew(1) />
<cfset str = structNew() />
<cfset str.nmfcClass = "apple" />
<cfset str.weight = "15" />
<cfset arrayAppend(items, str) />
<!--- freightShipmentQuoteRequest data--->
<cfset st = structNew() />
<cfset st.senderCity = "Freeport" />
<cfset st.senderState = "NY" />
<cfset st.senderZip = "11520" />
<cfset st.receiverCity = "Staten Island" />
<cfset st.receiverState = "NY" />
<cfset st.receiverZip = "10314" />
<cfset st.lineItems = "#items#" />
<cfset st.hazmatShipment = "N" />
<cfset st.insidePickup = "N" />
<cfset st.liftgatePickup = "N" />
<cfset st.residentialPickup = "N" />
<cfset st.tradeshowPickup = "N" />
<cfset st.constructionSitePickup = "N" />
<cfset st.insideDelivery = "N" />
<cfset st.liftgateDelivery = "N" />
<cfset st.residentialDelivery = "N" />
<cfset st.tradeshowDelivery = "N" />
<cfset st.constructionSiteDelivery = "N" />
<cfset st.notifyBeforeDelivery = "N" />
<cfinvoke
webservice="http://www.wwexship.com/webServices/services/FreightShipmentQuote?wsdl"
method="getShipmentSimpleQuote"
username="copssship"
password="password"
returnvariable="retTemp">
<cfheader name="loginId" value="copssship">
<cfheader name="password" value="password">
<cfheader name="licenseKey" value="hhrWQ7RMJEDKJMh4">
<cfheader name="accountNumber" value="W922601302">
<!---<cfheader name="AuthenticationToken" value="#stAuth#" />--->
<cfinvokeargument name="freightShipmentQuoteRequest" value="#st#" />
</cfinvoke>
<cfdump var="#retTemp#"><br/>
<cfoutput>
<b>retTemp:</b>#retTemp#<br/><br/>
<b>retTemp.ResponseStatusCode:</b>#retTemp.ResponseStatusCode#<br/>
<b>retTemp.responseStatusDescription:</b>#retTemp.responseStatusDescription#<br/>
<b>retTemp.errorDescriptions:</b>#retTemp.errorDescriptions[1]#<br/>
</cfoutput>

It looks very much to me like there's a mismatch between the arcuments you're passing and those expected. Here's 2 things I'd try:
1: Use foo=CreateObject("webservice","http://server/wsdl"); then dump the object. You should see methods and arguments on it, which may differ from your arguments above.
2: Download and install Fiddler. Then start it and add proxyServer="localhost" proxyPort="8888" to your call. ColdFusion will now route all web service requests through Fiddler and you can examine what's being passed to and from the remote server. It's quite a powerful technique for this kind of thing.
I think Chris is right, you need to be passing a struct as an argument. I can invoke the service with the code below:
<cfoutput>
<cfset shipService = CreateObject("webservice","http://www.wwexship.com/webServices/services/FreightShipmentQuote?wsdl")>
<cfdump var="#shipService#">
<cfset response=shipService.getShipmentSimpleQuote({})>
<cfdump var="#response#">
<cfdump var="#response.getResponseStatusCode()#">
<cfdump var="#response.getResponseStatusDescription()#">
The service is returning a fail code, but it does execute. The WSDL defines all members of FreightShipmentQuoteRequest as nillabla, which is why my code works, but when you come to implement is properly, you may need to use an array of structs for the lineItems element.

I'm unable to test this solution as i'm not able to login to the service, however it looks like getShipmentSimpleQuote takes a single struct argument called "freightShipmentQuoteRequest", with the keys you are trying to pass as arguments within it.
<cfinvoke
webservice="http:.....FreightShipmentQuote?wsdl"
method="getShipmentSimpleQuote"
returnvariable="aTemp">
<cfinvokeargument name="freightShipmentQuoteRequest" value="#{
"senderCity" = "Freeport",
"senderState" = "NY",
....
}#" />
</cfinvoke>
If that doesn't work you could try prefexing all your fields "freightShipmentQuoteRequest." ie.
<cfinvokeargument name="freightShipmentQuoteRequest.senderCity" value="Freeport"/>
What i can not see in the wsdl is any reference to the login parameters.

Related

Delphi Soap Web Services with xsd shema

First Of All sorry about my bad English :D and Thanks for your help...
I have to write a Delphi web service with xsd schema and the wsdl similar to wsdl at the bottom. Is it possible with Delphi. I have to write a service according to the existing web service client, the wsdl at the bottom belongs to an php web service with nusoap library.
I seem to hear you write this web service with php nusoap, but as you know that Delphi web service can be standalone exe and I need it's ability for our product.
I can write this web service with php no problem, but if it is possible, I want to write this web service with Delphi as a standalone.
I could write this web service with Delphi as standalone.The problem is that WSDL. My service's WSDL have to similar with the WSDL at the bottom. Can I do my service's wsdl similar to wsdl at the bottom? If it is possible,how can I do?
I'm using Delphi XE4.
Thanks again.
<?xml version="1.0" encoding="windows-1252"?>
<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="urn:wnposwsdl2" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:wnposwsdl2">
<types>
<xsd:schema targetNamespace="urn:wnposwsdl2">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>
<xsd:complexType name="wnposreply">
<xsd:all>
<xsd:element name="rtype" type="xsd:string"/>
<xsd:element name="rid" type="xsd:string"/>
<xsd:element name="rval1" type="xsd:string"/>
<xsd:element name="rval2" type="xsd:string"/>
<xsd:element name="rmessage1" type="xsd:string"/>
<xsd:element name="rmessage2" type="xsd:string"/>
<xsd:element name="rmessage3" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="posregister">
<xsd:all>
<xsd:element name="serialno" type="xsd:string"/>
<xsd:element name="posid" type="xsd:string"/>
<xsd:element name="siteid" type="xsd:string"/>
<xsd:element name="sitename" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="customercard">
<xsd:all>
<xsd:element name="cctype" type="xsd:string"/>
<xsd:element name="customercode" type="xsd:string"/>
<xsd:element name="ccnumber" type="xsd:string"/>
<xsd:element name="validfrom" type="xsd:string"/>
<xsd:element name="validto" type="xsd:string"/>
<xsd:element name="pin" type="xsd:string"/>
<xsd:element name="ccstatus" type="xsd:string"/>
<xsd:element name="total_d" type="xsd:float"/>
<xsd:element name="total_c" type="xsd:float"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="customer">
<xsd:all>
<xsd:element name="code" type="xsd:string"/>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="address1" type="xsd:string"/>
<xsd:element name="address2" type="xsd:string"/>
<xsd:element name="county" type="xsd:string"/>
<xsd:element name="city" type="xsd:string"/>
<xsd:element name="zip" type="xsd:string"/>
<xsd:element name="tel" type="xsd:string"/>
<xsd:element name="gsm" type="xsd:string"/>
<xsd:element name="email" type="xsd:string"/>
<xsd:element name="web" type="xsd:string"/>
<xsd:element name="listprice" type="xsd:string"/>
<xsd:element name="defdiscount" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="payment">
<xsd:all>
<xsd:element name="id" type="xsd:int"/>
<xsd:element name="val" type="xsd:float"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="ccard">
<xsd:all>
<xsd:element name="customercard" type="tns:customercard"/>
<xsd:element name="customer" type="tns:customer"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="ccardarray">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:ccard[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="customertrans">
<xsd:all>
<xsd:element name="ccnumber" type="xsd:string"/>
<xsd:element name="posserialno" type="xsd:string"/>
<xsd:element name="ftransid" type="xsd:string"/>
<xsd:element name="ftype" type="xsd:string"/>
<xsd:element name="ftm" type="xsd:string"/>
<xsd:element name="fno" type="xsd:string"/>
<xsd:element name="excode" type="xsd:string"/>
<xsd:element name="genexp" type="xsd:string"/>
<xsd:element name="sign" type="xsd:string"/>
<xsd:element name="amount" type="xsd:float"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="customertransarray">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:customertrans[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="payments">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:payment[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="itemtrans">
<xsd:all>
<xsd:element name="ttype" type="xsd:string"/>
<xsd:element name="subtype" type="xsd:string"/>
<xsd:element name="code" type="xsd:string"/>
<xsd:element name="quantity" type="xsd:float"/>
<xsd:element name="bprice" type="xsd:float"/>
<xsd:element name="itemgroupcode" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="itemtransarray">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:itemtrans[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="receiptheader">
<xsd:all>
<xsd:element name="fno" type="xsd:string"/>
<xsd:element name="ftm" type="xsd:string"/>
<xsd:element name="siteid" type="xsd:string"/>
<xsd:element name="customercard" type="tns:customercard"/>
<xsd:element name="payments" type="tns:payments"/>
<xsd:element name="nettotal" type="xsd:float"/>
<xsd:element name="calculatedtotalpoint" type="xsd:float"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="receipt">
<xsd:all>
<xsd:element name="ftransid" type="xsd:int"/>
<xsd:element name="serialno" type="xsd:string"/>
<xsd:element name="ctranstype" type="xsd:string"/>
<xsd:element name="header" type="tns:receiptheader"/>
<xsd:element name="items" type="tns:itemtransarray"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="receiptarray">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:receipt[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="spendingcheck">
<xsd:all>
<xsd:element name="ctrans" type="tns:customertrans"/>
<xsd:element name="basket" type="tns:receipt"/>
</xsd:all>
</xsd:complexType>
</xsd:schema>
</types>
<message name="register_posRequest">
<part name="posrecord" type="tns:posregister"/></message>
<message name="register_posResponse">
<part name="return" type="tns:wnposreply"/></message>
<message name="query_cardRequest">
<part name="customercard" type="tns:customercard"/></message>
<message name="query_cardResponse">
<part name="return" type="tns:wnposreply"/></message>
<message name="register_customerRequest">
<part name="ccardarray" type="tns:ccardarray"/></message>
<message name="register_customerResponse">
<part name="return" type="tns:wnposreply"/></message>
<message name="check_receiptRequest">
<part name="receipt" type="tns:receiptarray"/></message>
<message name="check_receiptResponse">
<part name="return" type="tns:wnposreply"/></message>
<message name="add_ctransRequest">
<part name="customertrans" type="tns:customertrans"/></message>
<message name="add_ctransResponse">
<part name="return" type="tns:wnposreply"/></message>
<message name="update_ctransRequest">
<part name="customertrans" type="tns:customertrans"/></message>
<message name="update_ctransResponse">
<part name="return" type="tns:wnposreply"/></message>
<message name="add_spendingRequest">
<part name="spendingcheck" type="tns:spendingcheck"/></message>
<message name="add_spendingResponse">
<part name="return" type="tns:wnposreply"/></message>
<portType name="wnposwsdl2PortType">
<operation name="register_pos">
<documentation>Register pos...</documentation>
<input message="tns:register_posRequest"/>
<output message="tns:register_posResponse"/>
</operation>
<operation name="query_card">
<documentation>Query customer card...</documentation>
<input message="tns:query_cardRequest"/>
<output message="tns:query_cardResponse"/>
</operation>
<operation name="register_customer">
<documentation>Registers customer(s)/card(s)/giftcard(s) to be used by the server, approval required by the db manager....</documentation>
<input message="tns:register_customerRequest"/>
<output message="tns:register_customerResponse"/>
</operation>
<operation name="check_receipt">
<documentation>Check receipt for gift or point collection..</documentation>
<input message="tns:check_receiptRequest"/>
<output message="tns:check_receiptResponse"/>
</operation>
<operation name="add_ctrans">
<documentation>Add trans..</documentation>
<input message="tns:add_ctransRequest"/>
<output message="tns:add_ctransResponse"/>
</operation>
<operation name="update_ctrans">
<documentation>Update added trans change stage...</documentation>
<input message="tns:update_ctransRequest"/>
<output message="tns:update_ctransResponse"/>
</operation>
<operation name="add_spending">
<documentation>Add spending ..</documentation>
<input message="tns:add_spendingRequest"/>
<output message="tns:add_spendingResponse"/>
</operation>
</portType>
<binding name="wnposwsdl2Binding" type="tns:wnposwsdl2PortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="register_pos">
<soap:operation soapAction="urn:wnposwsdl2#register_pos" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
<operation name="query_card">
<soap:operation soapAction="urn:wnposwsdl2#query_card" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
<operation name="register_customer">
<soap:operation soapAction="urn:wnposwsdl2#register_customer" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
<operation name="check_receipt">
<soap:operation soapAction="urn:wnposwsdl2#check_receipt" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
<operation name="add_ctrans">
<soap:operation soapAction="urn:wnposwsdl2#customertrans" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
<operation name="update_ctrans">
<soap:operation soapAction="urn:wnposwsdl2#customertrans" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
<operation name="add_spending">
<soap:operation soapAction="urn:wnposwsdl2#spendingcheck" style="rpc"/>
<input><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
<output><soap:body use="encoded" namespace="urn:wnposwsdl2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
</operation>
</binding>
<service name="wnposwsdl2">
<port name="wnposwsdl2Port" binding="tns:wnposwsdl2Binding">
<soap:address location="http://ksistemdomain.com:88/web.biz/server/wnposserver.php"/>
</port>
</service>
</definitions>
Sure, you can use Delphi to write a SOAP Service out of your wsdl file.
then you can use the result dll to call your service.
you can check out this link for more info.

How can I add additional payment information in admin order view page during order creation with magento SOAP(V2) service API?

I am trying to add extra data in Payment Information section like Bank Name: xxxxx and Account Number: xxxxx. But I don't know the exact operation to add the extra data. The steps I followed:
Added two params (param1, param2) in the file app/code/core/Mage/Checkout/etc/wsdl.xml :
<message name="shoppingCartPaymentMethodRequest">
<part name="sessionId" type="xsd:string"/>
<part name="quoteId" type="xsd:int"/>
<part name="method" type="typens:shoppingCartPaymentMethodEntity"/>
<part name="storeId" type="xsd:string"/>
<part name="param1" type="xsd:string"/>
<part name="param2" type="xsd:string"/>
</message>
Also added for WS-I complience. file : app/code/core/Mage/Checkout/etc/wsi.xml
<xsd:element name="shoppingCartPaymentMethodRequestParam">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
<xsd:element minOccurs="1" maxOccurs="1" name="quoteId" type="xsd:int" />
<xsd:element minOccurs="1" maxOccurs="1" name="paymentData" type="typens:shoppingCartPaymentMethodEntity" />
<xsd:element minOccurs="0" maxOccurs="1" name="store" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="param1" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="param2" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Here I tried to catch the params like this but didnt get any value.
file name: app/code/core/Mage/Checkout/Model/Cart/Payment/Api.php
public function setPaymentMethod($quoteId, $paymentData, $store = null, $param1, $param2)
{
Mage::log($param1);
Mage::log($param2);
// extra code
}
Here is my client code order-test.php:
<?php
$user = 'user';
$password = '123456789';
$proxy = new SoapClient('http://example.com/index.php/api/v2_soap/?wsdl');
$sessionId = $proxy->login($user, $password);
// extra codes
$paymentMethod = array(
'method' => 'checkmo',
// also tried here passing two params (param1, param2)
);
// add payment method
$proxy->shoppingCartPaymentMethod($sessionId, $cartId, $paymentMethod, null, $param1, $param2);
// place the order
$orderId = $proxy->shoppingCartOrder($sessionId, $cartId, null, null);
var_dump($orderId);
?>
Can anybody help on this topic ?
Thank You.
Note: Without passing extra parameters its working fine.

WSDL: No element type is defined for message

I'm creating a service orchestration using Eclipse BPEL Designer plugin and i have a problem with the WSDL file that it generates automatically.
Here is the WSDL:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.invocation.import" xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:wsdl="http://services.lolsystem.it" name="ImportOrchestration" targetNamespace="http://ws.invocation.import">
<plnk:partnerLinkType name="ImportType">
<plnk:role name="ImportRole" portType="wsdl:ImportServicePortType"/>
</plnk:partnerLinkType>
<import location="ImportModule.wsdl" namespace="http://services.italsystem.it"/>
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://ws.invocation.import">
<element name="ImportOrchestrationRequest" type="tns:ImportOrchestrationReqType">
</element>
<element name="singleEntry">
<complexType>
<sequence>
<element minOccurs="0" name="name" nillable="true" type="string"/>
<element minOccurs="0" name="content" nillable="true" type="base64Binary"/>
</sequence>
</complexType>
</element>
<element name="ImportOrchestrationResponse">
<complexType>
<sequence>
<element name="result" type="string"/>
</sequence>
</complexType>
</element>
<complexType name="ImportOrchestrationReqType">
<sequence minOccurs="1" maxOccurs="unbounded">
<element name="file" type="tns:SingleFile"></element>
</sequence>
</complexType>
<complexType name="SingleFile">
<sequence>
<element name="name" type="string"></element>
<element name="content" type="base64Binary"></element>
</sequence>
</complexType>
</schema>
</types>
<message name="ImportOrchestrationRequestMessage">
<part name="payload" type="tns:ImportOrchestrationReqType"/>
</message>
<message name="ImportOrchestrationResponseMessage">
<part element="tns:ImportOrchestrationResponse" name="payload"/>
</message>
<!-- portType implemented by the ImportOrchestration BPEL process -->
<portType name="ImportOrchestration">
<operation name="process">
<input message="tns:ImportOrchestrationRequestMessage"/>
<output message="tns:ImportOrchestrationResponseMessage"/>
</operation>
</portType>
<plnk:partnerLinkType name="ImportOrchestration">
<plnk:role name="ImportOrchestrationProvider" portType="tns:ImportOrchestration"/>
</plnk:partnerLinkType>
<binding name="ImportOrchestrationBinding" type="tns:ImportOrchestration">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="process">
<soap:operation soapAction="http://ws.invocation.import/process"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="ImportOrchestration">
<port binding="tns:ImportOrchestrationBinding" name="ImportOrchestrationPort">
<soap:address location="http://localhost:8080/ode/processes/ImportOrchestration"/>
</port>
</service>
</definitions>
Now, the problem is that Eclipse for Eclipse validator the WSDL is well formed.
I'm using Apache ODE as a BPEL engine, who is based on Axis2.
The problemi is that Axis engine give me an error when i try to deploy my BPEL proces, and it is:
"No element type is defined for message ImportOrchestrationRequestMessage"
Does someone can give me some advice to understand this error and how to correct it?
thanks in advance :)
Can you try following
<message name="ImportOrchestrationRequestMessage">
<part name="payload" element="tns:ImportOrchestrationRequest"/>
</message>
The problem is your binding is document literal, in that case the message part should be configured by using "element" rather than the "type"
HTH

Coldfusion How to authenticate webservice getShipmentSimpleQuote of WWEx?

How to invoke "getShipmentSimpleQuote" webservice from "Worldwide Express Freight Quote Web Service"? I am trying to invoke/consume this webservice but i am getting error saying "Invalid authentication info".
Here is wsdl file data:
WWEXFreightQuoteService.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.wwexship.com" xmlns:impl="http://www.wwexship.com" xmlns:intf="http://www.wwexship.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.wwexship.com" elementFormDefault="qualified">
<complexType name="AuthenticationToken">
<sequence>
<element name="loginId" nillable="true" type="xsd:string"/>
<element name="password" nillable="true" type="xsd:string"/>
<element name="licenseKey" nillable="true" type="xsd:string"/>
<element name="accountNumber" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<element name="AuthenticationToken" type="impl:AuthenticationToken" maxOccurs="1"/>
<complexType name="QuoteLineItem">
<sequence>
<element name="nmfcClass" nillable="true" type="xsd:string"/>
<element name="weight" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfQuoteLineItem">
<sequence>
<element name="lineItem" nillable="true" type="impl:QuoteLineItem" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="FreightShipmentQuoteRequest">
<sequence>
<element name="senderCity" nillable="true" type="xsd:string"/>
<element name="senderState" nillable="true" type="xsd:string"/>
<element name="senderZip" nillable="true" type="xsd:string"/>
<element name="receiverCity" nillable="true" type="xsd:string"/>
<element name="receiverState" nillable="true" type="xsd:string"/>
<element name="receiverZip" nillable="true" type="xsd:string"/>
<element name="lineItems" nillable="true" type="impl:ArrayOfQuoteLineItem"/>
<element name="hazmatShipment" nillable="true" type="xsd:string"/>
<element name="insidePickup" nillable="true" type="xsd:string"/>
<element name="liftgatePickup" nillable="true" type="xsd:string"/>
<element name="residentialPickup" nillable="true" type="xsd:string"/>
<element name="tradeshowPickup" nillable="true" type="xsd:string"/>
<element name="constructionSitePickup" nillable="true" type="xsd:string"/>
<element name="insideDelivery" nillable="true" type="xsd:string"/>
<element name="liftgateDelivery" nillable="true" type="xsd:string"/>
<element name="residentialDelivery" nillable="true" type="xsd:string"/>
<element name="tradeshowDelivery" nillable="true" type="xsd:string"/>
<element name="constructionSiteDelivery" nillable="true" type="xsd:string"/>
<element name="notifyBeforeDelivery" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<element name="freightShipmentQuoteRequest" type="impl:FreightShipmentQuoteRequest"/>
<complexType name="ErrorDescription">
<sequence>
<element name="errorDescription" nillable="true" type="xsd:string" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="CarrierQuoteResult">
<sequence>
<element name="carrierName" nillable="true" type="xsd:string"/>
<element name="carrierSCAC" nillable="true" type="xsd:string"/>
<element name="totalPrice" nillable="true" type="xsd:string"/>
<element name="transitDays" nillable="true" type="xsd:string"/>
<element name="interline" nillable="true" type="xsd:string"/>
<element name="guaranteedService" nillable="true" type="xsd:string"/>
<element name="highCostDeliveryShipment" nillable="true" type="xsd:string"/>
<element name="nmfcRequired" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfCarrierQuoteResult">
<sequence>
<element name="carrierQuoteResult" nillable="true" type="impl:CarrierQuoteResult" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="FreightShipmentQuoteResponse">
<sequence>
<element name="responseStatusCode" nillable="true" type="xsd:string"/>
<element name="responseStatusDescription" nillable="true" type="xsd:string"/>
<element name="errorDescriptions" nillable="true" type="impl:ErrorDescription"/>
<element name="quoteResults" nillable="true" type="impl:ArrayOfCarrierQuoteResult"/>
</sequence>
</complexType>
<element name="freightShipmentQuoteResponse" type="impl:FreightShipmentQuoteResponse"/>
</schema>
</wsdl:types>
<wsdl:message name="getShipmentSimpleQuoteResponse">
<wsdl:part name="freightShipmentQuoteResponse" element="impl:freightShipmentQuoteResponse"/>
</wsdl:message>
<wsdl:message name="FreightShipmentQuoteRequestHeaders">
<wsdl:part name="authenticationToken" element="impl:AuthenticationToken"/>
</wsdl:message>
<wsdl:message name="getShipmentSimpleQuoteRequest">
<wsdl:part name="freightShipmentQuoteRequest" element="impl:freightShipmentQuoteRequest"/>
</wsdl:message>
<wsdl:portType name="FreightShipmentQuote">
<wsdl:operation name="getShipmentSimpleQuote" parameterOrder="freightShipmentQuoteRequest">
<wsdl:input name="getShipmentSimpleQuoteRequest" message="impl:getShipmentSimpleQuoteRequest"/>
<wsdl:output name="getShipmentSimpleQuoteResponse" message="impl:getShipmentSimpleQuoteResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="FreightShipmentQuoteSoapBinding" type="impl:FreightShipmentQuote">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getShipmentSimpleQuote">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getShipmentSimpleQuoteRequest">
<wsdlsoap:body use="literal"/>
<wsdlsoap:header message="impl:FreightShipmentQuoteRequestHeaders" part="authenticationToken" use="literal">
</wsdlsoap:header>
</wsdl:input>
<wsdl:output name="getShipmentSimpleQuoteResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="FreightShipmentQuoteService">
<wsdl:port name="FreightShipmentQuote" binding="impl:FreightShipmentQuoteSoapBinding">
<wsdlsoap:address location="http://www.wwexship.com/webServices/services/FreightShipmentQuote"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
<br/>
My coldfusion code to consume/call the webservice is-<br/>
<b>consume.cfm</b>
<!--- items data --->
<cfset items = arrayNew(1) />
<cfset str = structNew() />
<cfset str.nmfcClass = "apple" />
<cfset str.weight = "15" />
<cfset arrayAppend(items, str) />
<!--- freightShipmentQuoteRequest data--->
<cfset st = structNew() />
<cfset st.senderCity = "Freeport" />
<cfset st.senderState = "NY" />
<cfset st.senderZip = "11520" />
<cfset st.receiverCity = "Staten Island" />
<cfset st.receiverState = "NY" />
<cfset st.receiverZip = "10314" />
<cfset st.lineItems = "#items#" />
<cfset st.hazmatShipment = "N" />
<cfset st.insidePickup = "N" />
<cfset st.liftgatePickup = "N" />
<cfset st.residentialPickup = "N" />
<cfset st.tradeshowPickup = "N" />
<cfset st.constructionSitePickup = "N" />
<cfset st.insideDelivery = "N" />
<cfset st.liftgateDelivery = "N" />
<cfset st.residentialDelivery = "N" />
<cfset st.tradeshowDelivery = "N" />
<cfset st.constructionSiteDelivery = "N" />
<cfset st.notifyBeforeDelivery = "N" />
<cfoutput>
<cfset shipService = CreateObject("webservice","http://www.wwexship.com/webServices/services/FreightShipmentQuote?wsdl")>
<cfdump var="#shipService#">
<cfset response1=shipService.getShipmentSimpleQuote(#st#)>
<cfset response=shipService.getShipmentSimpleQuote(#st#)>
<cfdump var="#response#">
<cfdump var="#response.getResponseStatusCode()#">
<cfdump var="#response.getResponseStatusDescription()#">
<cfdump var="#response.getErrorDescriptions()#">
</cfoutput>
I am unable to authenticate this webservice my login credentials are-
(1) loginId = copssship
(2) password = password
(3) licenseKey = hhrWQ7RMJEDKJMh4
(4) accountNumber = W922601302
Please suggest how to authenticate this webservice?
I have implemented http://www.wwexship.com web service in PHP. It is working fine.
<?php
$items = array();
$items[] = array('nmfcClass' => '50','weight' => '10');
$items[] = array('nmfcClass' => '50','weight' => '20');
$auth = Array('loginId' => "your Id", 'password' => "Your Pass",'licenseKey'=>'Your key','accountNumber'=>'Your account no,') ;
$client = new SoapClient('wsdl.xml',array( 'trace' =>1));
$header = new SoapHeader('http://www.wwexship.com','AuthenticationToken',$auth,false);
$client->__setSoapHeaders(array($header));
$result = $client->getShipmentSimpleQuote(array('senderCity' => 'Freeport','senderState'=>'NY','senderZip'=>'11520','receiverCity'=>'Staten Island','receiverState'=>'NY', 'receiverZip'=>'10314','lineItems'=>$items));
echo '<pre>';
print_r($result);
I think I may have the answer. The Authentication info is specified as a header. ColdFusion provides an AddSoapRequestHeader() method for situations like this. It appears to want values either as text or XML. The code below will run and get you a success code. Note that as well as adding the header, I've changed the NMFC code to 300 and weight to 2. The service complained about the initial values.
shipService = CreateObject("webservice","http://www.wwexship.com/webServices/services/FreightShipmentQuote?wsdl");
doc = XmlNew();
doc.xmlRoot = XmlElemNew(doc, "http://www.wwexship.com", "AuthenticationToken");
loginId = XmlElemNew(doc, "http://www.wwexship.com", "loginId");
loginId.XmlText = "copssship";
loginId.XmlAttributes["xsi:type"] = "xsd:string";
doc.xmlRoot.XmlChildren[1] = loginId;
password = XmlElemNew(doc, "http://www.wwexship.com", "password");
password.XmlText = "password";
password.XmlAttributes["xsi:type"] = "xsd:string";
doc.xmlRoot.XmlChildren[2] = password;
licenseKey = XmlElemNew(doc, "http://www.wwexship.com", "licenseKey");
licenseKey.XmlText = "hhrWQ7RMJEDKJMh4";
licenseKey.XmlAttributes["xsi:type"] = "xsd:string";
doc.xmlRoot.XmlChildren[3] = licenseKey;
accountNumber = XmlElemNew(doc, "http://www.wwexship.com", "accountNumber");
accountNumber.XmlText = "W922601302";
accountNumber.XmlAttributes["xsi:type"] = "xsd:string";
doc.xmlRoot.XmlChildren[4] = accountNumber;
AddSOAPRequestHeader(shipService,"http://www.wwexship.com","authenticationToken",doc);
response=shipService.getShipmentSimpleQuote(st);

Soap WSDL ComplexType being posted as wrong argument type

I have a server (SoapUI) answering requests for a WSDL.
When sending test requests, my server code is receiving a list of arguments, but I'm trying to achieve is a single argument, of complex type, eg:
{
ingredient_id => INT
something => STRING
...
}
My types are as follow:
<wsdl:types>
<xsd:schema targetNamespace="/ingredient">
<xsd:element name="getIngredientInfo" type="tns:IngredientRequest"></xsd:element>
<xsd:element name="getIngredientInfoResponse" type="tns:ingredient"></xsd:element>
<xsd:complexType name="ingredient">
<xsd:sequence>
<xsd:element name="ingredient_id" type="xsd:int" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="ingredient_name" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="status_gm" type="xsd:boolean" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="status_vegan" type="xsd:boolean" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="status_vegetarian" type="xsd:boolean" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="author_id" type="xsd:int" block="#all" minOccurs="1" maxOccurs="1"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="IngredientRequest">
<xsd:sequence>
<xsd:element name="ingredient_id" type="xsd:int"></xsd:element>
<xsd:element name="something" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
Can somebody help me to understand why WSDL is making SoapUI send the arguments as a list of simple arguments, instead of a single complex argument?
EDIT: It might be some problem with sequence tag, but I can't find the issue in that, just need some light.
Thanks in advance!
Sure, I have it right here:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions
name="ingredient"
targetNamespace="/ingredient"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="/ingredient"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema targetNamespace="/ingredient">
<xsd:element name="getIngredientInfo" type="tns:IngredientRequest"></xsd:element>
<xsd:element name="getIngredientInfoResponse" type="tns:ingredient"></xsd:element>
<xsd:complexType name="ingredient">
<xsd:sequence>
<xsd:element name="ingredient_id" type="xsd:int" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="ingredient_name" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="status_gm" type="xsd:boolean" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="status_vegan" type="xsd:boolean" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="status_vegetarian" type="xsd:boolean" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="author_id" type="xsd:int" block="#all" minOccurs="1" maxOccurs="1"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="IngredientRequest">
<xsd:sequence>
<xsd:element name="ingredient_id" type="xsd:int"></xsd:element>
<xsd:element name="something" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="getIngredientInfoRequest">
<wsdl:part element="tns:getIngredientInfo" name="parameters"/>
</wsdl:message>
<wsdl:message name="getIngredientInfoResponse">
<wsdl:part element="tns:getIngredientInfoResponse"
name="parameters" />
</wsdl:message>
<wsdl:portType name="ingredient">
<wsdl:operation name="getIngredientInfo">
<wsdl:input message="tns:getIngredientInfoRequest"/>
<wsdl:output message="tns:getIngredientInfoResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ingredientSOAP" type="tns:ingredient">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getIngredientInfo">
<soap:operation
soapAction="http://entropy.homelinux.org/kasak/" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ingredient">
<wsdl:port binding="tns:ingredientSOAP" name="ingredientSOAP">
<soap:address location="http://entropy.homelinux.org/kasak/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Still have no hints on it :(
You need to write your WSDL in "Document/literal wrapped"-style. These WSDL-styles are a bit confusing but here is a good comparison.
In essence you will need to wrap your complexType into an element:
<element name="IngredientInfo">
<complexType>
<sequence>
<element name="ingredient_id" type="xsd:int"></xsd:element>
<element name="something" type="xsd:string"></xsd:element>
</sequence>
</complexType>
</element>
and specify this element to be send as message
<message name="getIngredientInfoRequest">
<part name="parameters" element="IngredientInfo"/>
</message>
Thus the resulting SOAP message contains this the IngredientInfo-element as the only child of the SOAP body:
<soap:envelope>
<soap:body>
<IngredientInfo>
<ingredient_id>42</ingredient_id>
<something>"What is..."</something>
</IngredientInfo>
</soap:body>
</soap:envelope>
I don't think WSDL Type (IngredientRequest) is the issue, can you show the complete WSDL, especially the operation which you are testing if that's accepting a array of IngredientRequest type then that is the answer, why SOAP UI is sending a list of arguments.
Ok after using your WSDL for generating a sample request using my SOAP UI here is what I see
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ing="/ingredient">
<soapenv:Header/>
<soapenv:Body>
<ing:getIngredientInfo>
<ingredient_id>?</ingredient_id>
<something>?</something>
</ing:getIngredientInfo>
</soapenv:Body>
</soapenv:Envelope>
So as seen its creating a single getIngredientInfo request object no arrays. Please confirm, try using latest version of SOAP UI if required!
My understanding is that you currently have something like the following (I'm doing a web service call in Java, so I'll example in it):
SOAPCaller.getIngredientInformation(3, "something");
However, what you'd really like is the following:
IngredientRequest ingredientRequest = new IngredientRequest(3, "something");
SOAPCaller.getIngredientInformation(ingredientRequest);
Trying something like what Wierob suggested caused the first case to be what was generated for me. Unfortunately, the only way that I found to achieve the second is to do extra encapsulation which is messy (extra classes are generated). Yet, it allows a single object to be sent and a single object to be returned, rather than a number of objects. Here's an example:
<!-- assume the including of your complex types from above -->
<xsd:element name="getIngredientInfo" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ingredient" type="tns:IngredientRequest" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getIngredientInfoResponse" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ingredientResponse" type="tns:ingredient" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>