Click here to Skip to main content
15,887,812 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi ALL .
in my case,the server side has this methode and tns type:
HTML
<s:element name="AuthHeader" type="tns:AuthHeader" />
      <s:complexType name="AuthHeader">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="UserName" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
        </s:sequence>
        <s:anyAttribute />
      </s:complexType>
      <s:element name="GetCustomerInformation">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="CustomerNumber" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetCustomerInformationResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetCustomerInformationResult">
              <s:complexType>
                <s:sequence>
                  <s:element ref="s:schema" />
                  <s:any />
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>

in asp.net i take result by this code:
(refrence added into service refrence named 'Server')
C#
Server.ServiceSoapClient cli = new Server.ServiceSoapClient();
            Server.AuthHeader Auth = new Server.AuthHeader();
            Auth.UserName = "myusername";
            Auth.Password = "mypassword";
            string CustomerNumber="123456789";
            DataSet ds = cli.GetCustomerInformation(Auth, CustomerNumber);

but when use php nusoap returned fault:
PHP Code:
PHP
$param=array('AuthHeader'=>array('UserName'=>'myusername','Password'=>'mypassword')
            ,'CustomerNumber'=>'123456789');
$cli2= new nusoap_client('http://10.10.10.10:8080/Service.asmx?wsdl', true);
$err = $cli2->getError();
if ($err)
{
  print_r($err);
}
$res=$cli2->call('GetCustomerInformation',$param);
if ($cli2->fault)
{
  print_r($res);
}
else
{
  $err = $cli2->getError();
  if ($err)
  {
	print_r($err);
  }
  else
  {	
	print_r($res);
  }   
}


Return This Error:

wsdl error: http:/10.10.10.10:8080/:GetCustomerInformation^ (GetCustomerInformation^) is not a supported type.
Posted
Updated 13-Jan-14 13:24pm
v12
Comments
Member 10739303 14-Apr-14 2:18am    
Hello,
I am also facing the same problem. Need a help. I am setting the Authheader in a request then too response I am getting as no Authentication Header is defined.
hamid norouzi 26-Apr-14 1:34am    
Hello
i could not solving problem.
at last i switch to .net application

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900