Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6981765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:11:58+00:00 2026-05-27T18:11:58+00:00

I am attempting to get a SOAP client going, the only examples I get

  • 0

I am attempting to get a SOAP client going, the only examples I get from the service provider is in Java, but I need to do this with PHP. I’m not so new to Zend, but am new to using SOAP.

I think the host service is using Apache CXF.

I am using it like this (below) and keep getting and exception ‘Username not provided’

$wsdlprice = '/home/rob/var/www/catalog-pim/public/wsdl-docs/PriceAvailabilityService_V02.wsdl';
$client = new Zend_Soap_Client($wsdlprice, array('encoding' => 'UTF-8', 'compression' => SOAP_COMPRESSION_ACCEPT));
$client->setOptions(array('login' => 'my-username', 'password' => 'my-password'));

    print_r($client);

try {
    $client->getPriceAvailability(array('hideZeroInv' => '0'));
} 
catch (SoapFault $exception) {
    echo '<br /><br /><br />EXCEPTION=' . $exception;
}

The errors that I am getting:

EXCEPTION=SoapFault exception: [soap:000101] Username is not provided in /home/rob/var/www/catalog-pim/library/Zend/Soap/Client.php:1121 Stack trace: #0 /home/rob/var/www/catalog-pim/library/Zend/Soap/Client.php(1121): SoapClient->__soapCall('getPriceAvailab...', Array, NULL, NULL, Array)

I took a look at Zend’s ‘Client.php’ on line 1121 and it’s the soap ‘__call’ method. So, could be anything that PHP’s soap cient does not like….like not having the ‘Username’

I keep trying to add ‘username’, or ‘Username’ to the $client, I’ve tried adding it to ‘getPriceAvailability()’ method. I think I need to put it in the request header, but I cant figure that out either. I tried messing with $client->addSoapInputHeader(new SoapHeader::$header); but I don’t know what to put into $header and I cannot seem to find much on the web.

WSDL doc:

<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions name="PriceAvailabilityServiceV02" targetNamespace="http://pnaV02.model.ws.synnex.com/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://pnaV02.model.ws.synnex.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UTOverTransport">
        <wsp:ExactlyOne>
            <wsp:All>
                <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
                    <wsp:Policy>
                        <sp:TransportToken>
                            <wsp:Policy>
                                  <sp:HttpsToken RequireClientCertificate="false"/> 
                            </wsp:Policy>
                        </sp:TransportToken>
                        <sp:AlgorithmSuite>
                            <wsp:Policy>
                                <sp:Basic256/>
                            </wsp:Policy>
                        </sp:AlgorithmSuite>
                        <sp:Layout>
                            <wsp:Policy>
                                <sp:Lax/>
                            </wsp:Policy>
                        </sp:Layout>
                        <sp:IncludeTimestamp/>
                    </wsp:Policy>
                </sp:TransportBinding>
                <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
                    <wsp:Policy>
                        <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"/>
                    </wsp:Policy>
                </sp:SignedSupportingTokens>
            </wsp:All>
        </wsp:ExactlyOne>
    </wsp:Policy>    
  <wsdl:types>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://pnaV02.model.ws.synnex.com/" xmlns:tns="http://pnaV02.model.ws.synnex.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="getPriceAvailability" type="tns:getPriceAvailability" />
    <xs:element name="getPriceAvailabilityResponse" type="tns:getPriceAvailabilityResponse" />
    <xs:complexType name="getPriceAvailability">
        <xs:sequence>
            <xs:element maxOccurs="unbounded" minOccurs="0" name="skuList" type="tns:skuList" />
            <xs:element maxOccurs="unbounded" minOccurs="0" name="warehouse" type="tns:warehouse" />
            <xs:element name="hideZeroInv" type="xs:boolean" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="skuList">
        <xs:sequence>
            <xs:element minOccurs="0" name="synnexSku" type="xs:int" />
            <xs:element minOccurs="0" name="specialPriceType" type="tns:specialPriceType" />
            <xs:element minOccurs="0" name="mfgPartNumber" type="xs:string" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="getPriceAvailabilityResponse">
        <xs:sequence>
            <xs:element minOccurs="0" name="return" type="tns:pnaResponse" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="pnaResponse">
        <xs:sequence>
            <xs:element maxOccurs="unbounded" name="priceAvailabilityList" type="tns:pnaDetail" />
            <xs:element name="errorMessage" type="xs:string" />
            <xs:element name="errorDetail" type="xs:string" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="pnaDetail">
        <xs:sequence>
            <xs:element name="synnexSku" type="xs:int" />
            <xs:element name="mfgPartNumber" type="xs:string" />
            <xs:element name="mfgCode" type="xs:int" />
            <xs:element name="status" type="tns:pnaPartStatus" />
            <xs:element name="shortDescription" type="xs:string" />
            <xs:element name="globalProductStatusCode" type="tns:pnaPartStatus" />
            <xs:element name="resellerPrice" type="xs:double" />
            <xs:element name="totalQuantity" type="xs:int" />
            <xs:element name="totalOnOrder" type="xs:int" />
            <xs:element name="totalBO" type="xs:int" />
            <xs:element maxOccurs="unbounded" name="availabilityByWarehouseList" type="tns:availabilityByWarehouse" />
            <xs:element name="lineNumber" type="xs:int" />
            <xs:element minOccurs="0" name="specialPriceType" type="tns:specialPriceType" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="availabilityByWarehouse">
        <xs:sequence>
            <xs:element name="warehouseInfo" type="tns:warehouseInfo" />
            <xs:element name="quantity" type="xs:int" />
            <xs:element maxOccurs="unbounded" minOccurs="0" name="ETAList" type="tns:availETA" />
            <xs:element name="OnOrder" type="xs:int" />
            <xs:element name="BO" type="xs:int" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="warehouseInfo">
        <xs:sequence>
            <xs:element name="warehouse" type="tns:warehouse" />
            <xs:element name="zipCode" type="xs:string" />
            <xs:element name="city" type="xs:string" />
            <xs:element name="address" type="xs:string" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="availETA">
        <xs:sequence>
            <xs:element minOccurs="0" name="ETA" type="xs:string" />
            <xs:element name="QTY" type="xs:int" />
        </xs:sequence>
    </xs:complexType>
    <xs:simpleType name="specialPriceType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="PROMOTION" />
            <xs:enumeration value="FEDERALGOVERNMENT" />
            <xs:enumeration value="STATEGOVERNMENT" />
            <xs:enumeration value="EDUCATION" />
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="warehouse">
        <xs:restriction base="xs:string">
            <xs:enumeration value="ANY" />
            <xs:enumeration value="CLOSEST" />
            <xs:enumeration value="MULTIPLE" />
            <xs:enumeration value="DNV" />
            <xs:enumeration value="DFR" />
            <xs:enumeration value="DAT" />
            <xs:enumeration value="DTX" />
            <xs:enumeration value="DCH" />
            <xs:enumeration value="DTN" />
            <xs:enumeration value="DNJ" />
            <xs:enumeration value="DDC" />
            <xs:enumeration value="DOR" />
            <xs:enumeration value="DLA" />
            <xs:enumeration value="DCC" />
            <xs:enumeration value="DOH" />
            <xs:enumeration value="DFL" />
            <xs:enumeration value="DDS" />
            <xs:enumeration value="UNKNOWN" />
            </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="pnaPartStatus">
        <xs:restriction base="xs:string">
            <xs:enumeration value="DISCONTINUED" />
            <xs:enumeration value="INACTIVE" />
            <xs:enumeration value="ACTIVE" />
            <xs:enumeration value="NOTAUTHORIZED" />
            <xs:enumeration value="NOTSETUP" />
            <xs:enumeration value="NOTFOUND" />
            <xs:enumeration value="UNKNOWN" />
        </xs:restriction>
    </xs:simpleType>
</xs:schema>
  </wsdl:types>
  <wsdl:message name="getPriceAvailability">
    <wsdl:part element="tns:getPriceAvailability" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getPriceAvailabilityResponse">
    <wsdl:part element="tns:getPriceAvailabilityResponse" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="PriceAvailabilityService" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" wsp:PolicyURIs="#UTOverTransport">
    <wsdl:operation name="getPriceAvailability">
      <wsdl:input message="tns:getPriceAvailability" name="getPriceAvailability">
    </wsdl:input>
      <wsdl:output message="tns:getPriceAvailabilityResponse" name="getPriceAvailabilityResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="PriceAvailabilityServiceV02SoapBinding" type="tns:PriceAvailabilityService">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="getPriceAvailability">
      <soap:operation soapAction="" style="document" />
      <wsdl:input name="getPriceAvailability">
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output name="getPriceAvailabilityResponse">
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="PriceAvailabilityServiceV02">
    <wsdl:port binding="tns:PriceAvailabilityServiceV02SoapBinding" name="PriceAvailabilityServicePort">
      <soap:address location="http://ws.synnex.com/webservice/pnaserviceV02" />
    </wsdl:port>
     <wsdl:port binding="tns:PriceAvailabilityServiceV02SoapBinding" name="PriceAvailabilityServicePort_UAT">
      <soap:address location="http://testws.synnex.com/webservice/pnaserviceV02" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:11:59+00:00Added an answer on May 27, 2026 at 6:11 pm

    Answering my own question again…(not so bad though)

    I discovered that I am in fact trying to connect to a CXF service http://cxf.apache.org/

    This particular service uses WS Security outlined here: http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wss

    I am not the only one who has ran into this issue when attempting to connect to such a service using PHP, fortunately (for me) I found this post http://sastriawan.blogspot.com/2010/01/accessing-ws-security-protected.html

    The link above clearly shows an example of how to use a class obtained from the University of Tornto’s website, and another small library called ‘xmlseclibs’ that I found at Google Code http://code.google.com/p/xmlseclibs/

    I haven’t studied the ‘new’ code extensively yet, but it appears that it handles putting the authentication into the header of the request, and is working for me just fine.

    I created a new class similar to the one on the blog that extends SoapClient and added my own auth credentials and am now able to connect to the server…only getting complaints about method variables missing…which I will fix shortly now that I can make a connection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to get all the data from a MySQL db with PHP,
I am attempting to create a PHP SOAP connection to a .NET Web Service
I've been attempting to get a toy intent service running for monodroid essentially going
I am attempting to get the information from one table (games) and count the
I am attempting to get some information from a website, the info that I
I am attempting to get my arms around some basic prolog but struggling a
I'm attempting to get my feet wet with python on Project Euler, but I'm
Attempting to get an answer to this question. How can I turn off the
Attempting to get LocationUpdates in my Service, however, it doesnt ever seem to fire
I'm attempting to get the information from the brews and recipes tables based off

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.