soap-client

How to see request and response data in node soap?

泪湿孤枕 提交于 2019-12-10 15:55:45
问题 I am trying to consume a soap api using node soap. My response cannot be parsed and I wonder how to see the request and response data to console to ease the error finding process. 回答1: As node soap uses the request library, one can debug it via: NODE_DEBUG=request node src/index.js as pointed out request's Readme.md: Debugging There are at least three ways to debug the operation of request : Launch the node process like NODE_DEBUG=request node script.js ( lib,request,otherlib works too). Set

How can I configure the Root Element of a node-soap request body?

a 夏天 提交于 2019-12-10 15:17:33
问题 I'm trying to call a SOAP method using the node-soap package. My service's WSDL is: <wsdl:definitions name="PublicoService" targetNamespace="http://tempuri.org/"> <wsdl:import namespace="" location="http://10.10.0.45:56777/Services/PublicoService.svc?wsdl=wsdl0"/> <wsdl:types/> <wsdl:binding name="CustomBinding_PublicoService" type="PublicoService"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="GetAllDepartamento"> <soap:operation soapAction="urn

ASMX web service reference how to set equivalent to MaxReceivedMessageSize

吃可爱长大的小学妹 提交于 2019-12-10 14:08:13
问题 Web Service is an ASMX web service (NOT WCF) I am receiving an error The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element I am using a proxy that Visual Studio generates for you when you add a "Web Reference" (please note that I am NOT adding "Service Reference", instead I am using Web Reference)... this creates a proxy that inherits from SoapHttpClientProtocol Can

Add wsse:UsernameToken in soap header

巧了我就是萌 提交于 2019-12-10 11:42:15
问题 I am working on SOAP client. My WSDL URL is http://localhost:8080/soap/getMessage?wsdl . This requires the the following header to specify the username and password. <wsdl:Envelope xmlns:soap="..." xmlns:wsse="..." > <wsdl:Header> <wsse:Security> <wsse:UsernameToken> <wsse:Username>admin</wsse:Username> <wsse:Password>password</wsse:Password> </wsse:UsernameToken> </wsse:Security> </wsdl:Header> </wsdl:Envelope> I have to write a program for it. Can some one help me. Thanks. 回答1: here is my

Retrieving specific values from a SoapClient Return in PHP

南笙酒味 提交于 2019-12-10 09:23:24
问题 I call an webservice using PHP 5.3.1 and my request looks as so: <?php $client = new SoapClient('the API wsdl'); $param = array( 'LicenseKey' => 'a guid' ); $result = $client->GetUnreadIncomingMessages($param); echo "<pre>"; print_r($result); echo "</pre>"; ?> Here is the response that I get back: stdClass Object ( [GetUnreadIncomingMessagesResult] => stdClass Object ( [SMSIncomingMessage] => Array ( [0] => stdClass Object ( [FromPhoneNumber] => the number [IncomingMessageID] => message ID

Sending XML input to WSDL using SoapClient

陌路散爱 提交于 2019-12-09 06:30:21
问题 I have this WSDL: https://secure.softwarekey.com/solo/webservices/XmlCustomerService.asmx?WSDL I am trying to use SoapClient to send a request to the CustomerSearch method. The code I'm using is as follows: $url = 'https://secure.softwarekey.com/solo/webservices/XmlCustomerService.asmx?WSDL'; $client = new SoapClient($url); $CustomerSearch = array( 'AuthorID' => $authorID, 'UserID' => $userID, 'UserPassword' => $userPassword, 'Email' => $customerEmail ); $xml = array('CustomerSearch' =>

SOAP-ERROR: Encoding: Object has no property

非 Y 不嫁゛ 提交于 2019-12-08 17:33:58
问题 I need to create a SOAP request which looks like this: <soapenv:Body> <getItemsForProject> <token> <user>?</user> <password>?</password> </token> <projectId></projectId> <start>0</start> <count>0</count> </getItemsForProject> </soapenv:Body> The operation expects this: [209] => struct getItemsForProject { wsAuth token; long projectId; int start; int count; } I have tried the following but keep hitting PHP Fatal error: SOAP-ERROR: Encoding: object has no 'start' property I know that the token

**SOAP-ERROR:** Encoding: Cannot find encoding

*爱你&永不变心* 提交于 2019-12-08 10:19:56
问题 I gotta consume a SOAP service from PHP but I keep failing to get the response. Maybe it's a problem with the format or the call or idk. I can for example get all the functions names from the server with the __getFunctions() method. But when I try to invoke any function I keep getting: SOAP-ERROR: Encoding: Cannot find encoding Below is the code. $wsdl = "https://testing.memoryefactura.com/Memory.FEManager/WebService/CFEService.svc?wsdl"; $parameters = array('Rut' => 'XXXXX', 'CommerceCode' =

How to get http request headers used by SoapClient?

淺唱寂寞╮ 提交于 2019-12-08 10:06:36
问题 I want to check my http headers that are sent via a SoapClient. Yet it only offers quick functions to fetch the Soap headers: /** * Returns the SOAP headers from the last request * @link http://php.net/manual/en/soapclient.getlastrequestheaders.php * @return string The last SOAP request headers. * @since 5.0.1 */ public function __getLastRequestHeaders () {} I am not interested in those. How can I find out what http headers have been used for the request on the HTTP level? Xdebug loses

I am consuming a WCF service that requires headers from a .NET 2 website. How can I programmatically add the headers to the messages?

陌路散爱 提交于 2019-12-08 08:23:45
I have a WCF service that uses a custom instance provider (implements IInstanceProvider) for which the GetInstance method expects a message that contains a few headers, like this: public object GetInstance(InstanceContext instanceContext, Message message) { string token = null; if (message != null) { token = message.Headers.GetHeader<string>("Token", "urn:userinfo"); } Bootstrapper bootstrapper = new Bootstrapper(); bootstrapper.InitialiseSession(token); return new MyServiceHost(bootstrapper.ServiceModel); } This service now needs to be called from a .NET 2 web application, so I added a