Search Results

Search found 21480 results on 860 pages for 'soap client'.

Page 2/860 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Web Service - SOAP

    - by seth
    My experience with web services is slim and I'm trying to understand this a little bit more. I have done for instance a web service using visual studio. In order to use it, I add a web service reference in my projects and this creates a proxy and the use is pretty simple. Does this use SOAP? I ask this because i will be now facing a web service that i must communicate using SOAP with attachements and i'm trying to understand the concept behind this and the difference to what i have done so far. Will the proxy still be viable or do i need to create the XML by hand and post it to the web service? This concepts still confuse and so any help is appreciated. EDIT: I'm not developing the service, i will be just using it.

    Read the article

  • When to use SOAP over REST

    So, how does REST based services differ from SOAP based services, and when should you use SOAP? Representational State Transfer (REST) implements the standard HTTP/HTTPS as an interface allowing clients to obtain access to resources based on requested URIs. An example of a URI may look like this http://mydomain.com/service/method?parameter=var1&parameter=var2. It is important to note that REST based services are stateless because http/https is natively stateless. One of the many benefits for implementing HTTP/HTTPS as an interface is can be found in caching. Caching can be done on a web service much like caching is done on requested web pages. Caching allows for reduced web server processing and increased response times because content is already processed and stored for immediate access. Typical actions performed by REST based services include generic CRUD (Create, Read, Update, and Delete) operations and operations that do not require state. Simple Object Access Protocol (SOAP) on the other hand uses a generic interface in order to transport messages. Unlike REST, SOAP can use HTTP/HTTPS, SMTP, JMS, or any other standard transport protocols. Furthermore, SOAP utilizes XML in the following ways: Define a message Defines how a message is to be processed Defines the encoding of a message Lays out procedure calls and responses As REST aligns more with a Resource View, SOAP aligns more with a Method View in that business logic is exposed as methods typically through SOAP web service because they can retain state. In addition, SOAP requests are not cached therefore every request will be processed by the server. As stated before Soap does retain state and this gives it a special advantage over REST for services that need to preform transactions where multiple calls to a service are need in order to complete a task. Additionally, SOAP is more ideal for enterprise level services that implement standard exchange formats in the form of contracts due to the fact that REST does not currently support this. A real world example of where SOAP is preferred over REST can be seen in the banking industry where money is transferred from one account to another. SOAP would allow a bank to perform a transaction on an account and if the transaction failed, SOAP would automatically retry the transaction ensuring that the request was completed. Unfortunately, with REST, failed service calls must be handled manually by the requesting application. References: Francia, S. (2010). SOAP vs. REST. Retrieved 11 20, 2011, from spf13: http://spf13.com/post/soap-vs-rest Rozlog, M. (2010). REST and SOAP: When Should I Use Each (or Both)? Retrieved 11 20, 2011, from Infoq.com: http://www.infoq.com/articles/rest-soap-when-to-use-each

    Read the article

  • What language yields most rapid development of a SOAP client application

    - by mathematician1975
    I have written a SOAP client application. It started off as Perl but I needed it to have proper multithreaded capabilities, so I rewrote it in C++ which was a horrendous experience and the development time was many many times more than that of the Perl bot. I need to implement a new SOAP client and I was wondering what peoples opinions were about choice of language with regards to fastest development time. C++ is clearly not well suited to web services type programming so there is no way I am going to write in C++ again.

    Read the article

  • Can't connect to SSL web service with WS-Security using PHP SOAP extension - certificate, complex WSDL

    - by BillF
    Using the PHP5 SOAP extension I have been unable to connect to a web service having an https endpoint, with client certificate and using WS-Security, although I can connect using soapUI with the exact same wsdl and client certificate, and obtain the normal response to the request. There is no HTTP authentication and no proxy is involved. The message I get is 'Could not connect to host'. Have been able to verify that I am NOT hitting the host server. (Earlier I wrongly said that I was hitting the server.) The self-signed client SSL certificate is a .pem file converted by openssl from a .p12 keystore which in turn was converted by keytool from a .jks keystore having a single entry consisting of private key and client certificate. In soapUI I did not need to supply a server private certificate, the only two files I gave it were the wdsl and pem. I did have to supply the pem and its passphrase to be able to connect. I am speculating that despite the error message my problem might actually be in the formation of the XML request rather than the SSL connection itself. The wsdl I have been given has nested complex types. The php server is on my Windows XP laptop with IIS. The code, data values and WSDL extracts are shown below. (The WSSoapClient class simply extends SoapClient, adding a WS-Security Username Token header with mustUnderstand = true and including a nonce, both of which the soapUI call had required.) Would so much appreciate any help. I'm a newbie thrown in at the deep end, and how! Have done vast amounts of Googling on this over many days, following many suggestions and have read Pro PHP by Kevin McArthur. An attempt to use classmaps in place of nested arrays also fell flat. The Code class STEeService { public function invokeWebService(array $connection, $operation, array $request) { try { $localCertificateFilespec = $connection['localCertificateFilespec']; $localCertificatePassphrase = $connection['localCertificatePassphrase']; $sslOptions = array( 'ssl' => array( 'local_cert' => $localCertificateFilespec, 'passphrase' => $localCertificatePassphrase, 'allow_self-signed' => true, 'verify_peer' => false ) ); $sslContext = stream_context_create($sslOptions); $clientArguments = array( 'stream_context' => $sslContext, 'local_cert' => $localCertificateFilespec, 'passphrase' => $localCertificatePassphrase, 'trace' => true, 'exceptions' => true, 'encoding' => 'UTF-8', 'soap_version' => SOAP_1_1 ); $oClient = new WSSoapClient($connection['wsdlFilespec'], $clientArguments); $oClient->__setUsernameToken($connection['username'], $connection['password']); return $oClient->__soapCall($operation, $request); } catch (exception $e) { throw new Exception("Exception in eServices " . $operation . " ," . $e->getMessage(), "\n"); } } } $connection is as follows: array(5) { ["username"]=> string(8) "DFU00050" ["password"]=> string(10) "Fabricate1" ["wsdlFilespec"]=> string (63) "c:/inetpub/wwwroot/DMZExternalService_Concrete_WSDL_Staging.xml" ["localCertificateFilespec"]=> string(37) "c:/inetpub/wwwroot/ClientKeystore.pem" ["localCertificatePassphrase"]=> string(14) "password123456" } $clientArguments is as follows: array(7) { ["stream_context"]=> resource(8) of type (stream-context) ["local_cert"]=> string(37) "c:/inetpub/wwwroot/ClientKeystore.pem" ["passphrase"]=> string(14) "password123456" ["trace"]=> bool(true) ["exceptions"]=> bool(true) ["encoding"]=> string(5) "UTF-8" ["soap_version"]=> int(1) } $operation is as follows: 'getConsignmentDetails' $request is as follows: array(1) { [0]=> array(2) { ["header"]=> array(2) { ["source"]=> string(9) "customerA" ["accountNo"]=> string(8) "10072906" } ["consignmentId"]=> string(11) "GKQ00000085" } } Note how there is an extra level of nesting, an array wrapping the request which is itself an array. This was suggested in a post although I don't see the reason, but it seems to help avoid other exceptions. The exception thrown by ___soapCall is as follows: object(SoapFault)#6 (9) { ["message":protected]=> string(25) "Could not connect to host" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(43) "C:\Inetpub\wwwroot\eServices\WSSecurity.php" ["line":protected]=> int(85) ["trace":"Exception":private]=> array(5) { [0]=> array(6) { ["file"]=> string(43) "C:\Inetpub\wwwroot\eServices\WSSecurity.php" ["line"]=> int(85) ["function"]=> string(11) "__doRequest" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(4) { [0]=> string(1240) " DFU00050 Fabricate1 E0ByMUA= 2010-10-28T13:13:52Z customerA10072906GKQ00000085 " [1]=> string(127) "https://services.startrackexpress.com.au:7560/DMZExternalService/InterfaceServices/ExternalOps.serviceagent/OperationsEndpoint1" [2]=> string(104) "/DMZExternalService/InterfaceServices/ExternalOps.serviceagent/OperationsEndpoint1/getConsignmentDetails" [3]=> int(1) } } [1]=> array(4) { ["function"]=> string(11) "__doRequest" ["class"]=> string(39) "startrackexpress\eservices\WSSoapClient" ["type"]=> string(2) "->" ["args"]=> array(5) { [0]=> string(1240) " DFU00050 Fabricate1 E0ByMUA= 2010-10-28T13:13:52Z customerA10072906GKQ00000085 " [1]=> string(127) "https://services.startrackexpress.com.au:7560/DMZExternalService/InterfaceServices/ExternalOps.serviceagent/OperationsEndpoint1" [2]=> string(104) "/DMZExternalService/InterfaceServices/ExternalOps.serviceagent/OperationsEndpoint1/getConsignmentDetails" [3]=> int(1) [4]=> int(0) } } [2]=> array(6) { ["file"]=> string(43) "C:\Inetpub\wwwroot\eServices\WSSecurity.php" ["line"]=> int(70) ["function"]=> string(10) "__soapCall" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(4) { [0]=> string(21) "getConsignmentDetails" [1]=> array(1) { [0]=> array(2) { ["header"]=> array(2) { ["source"]=> string(9) "customerA" ["accountNo"]=> string(8) "10072906" } ["consignmentId"]=> string(11) "GKQ00000085" } } [2]=> NULL [3]=> object(SoapHeader)#5 (4) { ["namespace"]=> string(81) "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" ["name"]=> string(8) "Security" ["data"]=> object(SoapVar)#4 (2) { ["enc_type"]=> int(147) ["enc_value"]=> string(594) " DFU00050 Fabricate1 E0ByMUA= 2010-10-28T13:13:52Z " } ["mustUnderstand"]=> bool(true) } } } [3]=> array(6) { ["file"]=> string(42) "C:\Inetpub\wwwroot\eServices\eServices.php" ["line"]=> int(87) ["function"]=> string(10) "__soapCall" ["class"]=> string(39) "startrackexpress\eservices\WSSoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(21) "getConsignmentDetails" [1]=> array(1) { [0]=> array(2) { ["header"]=> array(2) { ["source"]=> string(9) "customerA" ["accountNo"]=> string(8) "10072906" } ["consignmentId"]=> string(11) "GKQ00000085" } } } } [4]=> array(6) { ["file"]=> string(58) "C:\Inetpub\wwwroot\eServices\EnquireConsignmentDetails.php" ["line"]=> int(44) ["function"]=> string(16) "invokeWebService" ["class"]=> string(38) "startrackexpress\eservices\STEeService" ["type"]=> string(2) "->" ["args"]=> array(3) { [0]=> array(5) { ["username"]=> string(10) "DFU00050 " ["password"]=> string(12) "Fabricate1 " ["wsdlFilespec"]=> string(63) "c:/inetpub/wwwroot/DMZExternalService_Concrete_WSDL_Staging.xml" ["localCertificateFilespec"]=> string(37) "c:/inetpub/wwwroot/ClientKeystore.pem" ["localCertificatePassphrase"]=> string(14) "password123456" } [1]=> string(21) "getConsignmentDetails" [2]=> array(1) { [0]=> array(2) { ["header"]=> array(2) { ["source"]=> string(9) "customerA" ["accountNo"]=> string(8) "10072906" } ["consignmentId"]=> string(11) "GKQ00000085" } } } } } ["previous":"Exception":private]=> NULL ["faultstring"]=> string(25) "Could not connect to host" ["faultcode"]=> string(4) "HTTP" } Here are some WSDL extracts (TIBCO BusinessWorks): <xsd:complexType name="TransactionHeaderType"> <xsd:sequence> <xsd:element name="source" type="xsd:string"/> <xsd:element name="accountNo" type="xsd:integer"/> <xsd:element name="userId" type="xsd:string" minOccurs="0"/> <xsd:element name="transactionId" type="xsd:string" minOccurs="0"/> <xsd:element name="transactionDatetime" type="xsd:dateTime" minOccurs="0"/> </xsd:sequence> </xsd:complexType> <xsd:element name="getConsignmentDetailRequest"> <xsd:complexType> <xsd:sequence> <xsd:element name="header" type="prim:TransactionHeaderType"/> <xsd:element name="consignmentId" type="prim:ID" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="getConsignmentDetailResponse"> <xsd:complexType> <xsd:sequence> <xsd:element name="consignment" type="freight:consignmentType" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="getConsignmentDetailRequest"> <xsd:complexType> <xsd:sequence> <xsd:element name="header" type="prim:TransactionHeaderType"/> <xsd:element name="consignmentId" type="prim:ID" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="getConsignmentDetailResponse"> <xsd:complexType> <xsd:sequence> <xsd:element name="consignment" type="freight:consignmentType" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <wsdl:operation name="getConsignmentDetails"> <wsdl:input message="tns:getConsignmentDetailsRequest"/> <wsdl:output message="tns:getConsignmentDetailsResponse"/> <wsdl:fault name="fault1" message="tns:fault"/> </wsdl:operation> <wsdl:service name="ExternalOps"> <wsdl:port name="OperationsEndpoint1" binding="tns:OperationsEndpoint1Binding"> <soap:address location="https://services.startrackexpress.com.au:7560/DMZExternalService/InterfaceServices/ExternalOps.serviceagent/OperationsEndpoint1"/> </wsdl:port> </wsdl:service> And here in case it's relevant is the WSSoapClient class: <?PHP namespace startrackexpress\eservices; use SoapClient, SoapVar, SoapHeader; class WSSoapClient extends SoapClient { private $username; private $password; /*Generates a WS-Security header*/ private function wssecurity_header() { $timestamp = gmdate('Y-m-d\TH:i:s\Z'); $nonce = mt_rand(); $passdigest = base64_encode(pack('H*', sha1(pack('H*', $nonce).pack('a*', $timestamp).pack('a*', $this->password)))); $auth = ' <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken> <wsse:Username>' . $this->username . '</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $this->password . '</wsse:Password> <wsse:Nonce>' . base64_encode(pack('H*', $nonce)).'</wsse:Nonce> <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">' . $timestamp . '</wsu:Created> </wsse:UsernameToken> </wsse:Security> '; $authvalues = new SoapVar($auth, XSD_ANYXML); $header = new SoapHeader("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Security",$authvalues, true); return $header; } // Sets a username and passphrase public function __setUsernameToken($username,$password) { $this->username=$username; $this->password=$password; } // Overwrites the original method, adding the security header public function __soapCall($function_name, $arguments, $options=null, $input_headers=null, $output_headers=null) { try { $result = parent::__soapCall($function_name, $arguments, $options, $this->wssecurity_header()); return $result; } catch (exception $e) { throw new Exception("Exception in __soapCall, " . $e->getMessage(), "\n"); } } } ?> Update: The request XML would have been as follows: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://startrackexpress/Common/Primitives/v1" xmlns:ns2="http://startrackexpress/Common/actions/externals/Consignment/v1" xmlns:ns3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <SOAP-ENV:Header> <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken> <wsse:Username>DFU00050</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">Fabricate1</wsse:Password> <wsse:Nonce>M4FIeGA=</wsse:Nonce> <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2010-10-29T14:05:27Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> </SOAP-ENV:Header> <SOAP-ENV:Body><ns2:getConsignmentDetailRequest> <ns2:header><ns1:source>customerA</ns1:source><ns1:accountNo>10072906</ns1:accountNo></ns2:header> <ns2:consignmentId>GKQ00000085</ns2:consignmentId> </ns2:getConsignmentDetailRequest></SOAP-ENV:Body> </SOAP-ENV:Envelope> This was obtained with the following code in WSSoapClient: public function __doRequest($request, $location, $action, $version) { echo "<p> " . htmlspecialchars($request) . " </p>" ; return parent::__doRequest($request, $location, $action, $version); }

    Read the article

  • SOAP namespace from SOAP request

    - by BANSAL MOHIT
    This request is generated when web service is called. Can you tell me what the namespace will be? I am confused <?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Header/> <S:Body> <ns2:getNews xmlns:ns2="http://src/"> <ticker>NASDAQ:INFY</ticker> </ns2:getNews> </S:Body> </S:Envelope>

    Read the article

  • PHP - Zend Soap Request to .NET SOAP Server

    - by G0D
    Hello! I'd like a little bit of assistance here. I am trying to send a request to a .NET SOAP server from PHP with Zend. I have the WSDL file but it does not contain any header information. Though I have tried to add a custom header this does not seem to work and the worst is that the WSDL file itself does not seem to be "right"..... Here is the link: http://www.speedex.gr/getvoutrans/getvoutrans.asmx The WSDL can be found in the same link by adding ?WSDL My request is: GetVouTrans Thanx in advance!

    Read the article

  • Soap Delphi Client end with a timeout for a 1MB call

    - by Cédric Girard
    Hi, we are developing a SOAP webservice (Apache/PHP). All run well for small size calls, but with a 1Mb soap call (the HTTPS call size is 1MB) our Delphi Soap client stop with a timeout on all PC but one, and our PHP clients run well with a default_socket_timeout=300, but stop with a "Error Fetching http headers" with default_socket_timeout=60. How can we change the timeout for Delphi? In fact this timeout seem to be in a Windows XP network library (wininet.dll called by soaphttptrans.pas) Thanks Cédric

    Read the article

  • Android ksoap nested soap objects in request gives error in response

    - by Smalesy
    I'm trying to do the following soap request on Android using KSOAP. It contains a list of nested soap objects. However, I must be doing something wrong as I get an error back. The request I am trying to generate is as follows: <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <SetAttendanceMarks xmlns="http://hostname.net/"> <strSessionToken>string</strSessionToken> <LessonMarks> <Count>int</Count> <LessonMarks> <LessonMark> <StudentId>int</StudentId> <EventInstanceId>int</EventInstanceId> <Mark>string</Mark> </LessonMark> <LessonMark> <StudentId>int</StudentId> <EventInstanceId>int</EventInstanceId> <Mark>string</Mark> </LessonMark> </LessonMarks> </LessonMarks> </SetAttendanceMarks> </soap12:Body> </soap12:Envelope> My code is as follows: public boolean setAttendanceMarks(List<Mark> list) throws Exception { boolean result = false; String methodName = "SetAttendanceMarks"; String soapAction = getHost() + "SetAttendanceMarks"; SoapObject lessMarksN = new SoapObject(getHost(), "LessonMarks"); for (Mark m : list) { PropertyInfo smProp =new PropertyInfo(); smProp.setName("LessonMark"); smProp.setValue(m); smProp.setType(Mark.class); lessMarksN.addProperty(smProp); } PropertyInfo cProp =new PropertyInfo(); cProp.setName("Count"); cProp.setValue(list.size()); cProp.setType(Integer.class); SoapObject lessMarks = new SoapObject(getHost(), "LessonMarks"); lessMarks.addProperty(cProp); lessMarks.addSoapObject(lessMarksN); PropertyInfo sProp =new PropertyInfo(); sProp.setName("strSessionToken"); sProp.setValue(mSession); sProp.setType(String.class); SoapObject request = new SoapObject(getHost(), methodName); request.addProperty(sProp); request.addSoapObject(lessMarks); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER12); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(getURL()); androidHttpTransport.debug = true; androidHttpTransport.call(soapAction, envelope); String a = androidHttpTransport.requestDump; String b = androidHttpTransport.responseDump; SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn; SoapObject res = (SoapObject) resultsRequestSOAP.getProperty(0); String resultStr = res.getPropertyAsString("Result"); if (resultStr.contentEquals("OK")) { result = true; } return result; } The error I get is as follows: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <soap:Fault> <soap:Code> <soap:Value>soap:Sender</soap:Value> </soap:Code> <soap:Reason> <soap:Text xml:lang="en">Server was unable to read request. ---&gt; There is an error in XML document (1, 383). ---&gt; The specified type was not recognized: name='LessonMarks', namespace='http://gsdregapp.net/', at &lt;LessonMarks xmlns='http://gsdregapp.net/'&gt;.</soap:Text> </soap:Reason> <soap:Detail /> </soap:Fault> </soap:Body> </soap:Envelope> Can anybody tell me what I am doing wrong? I will be most grateful for any assistance!

    Read the article

  • PHP SOAP Error: maximum string content length quota (8192) has been exceeded while reading XML data

    - by Sadi
    I am trying to use bing with PHP SOAP. It works fine for short strings. But for larger string I get following error: Fatal error: Uncaught SoapFault exception: [a:DeserializationFailed] The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'Translate'. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 9, position 227. in ........ I am using XAMPP in windows 7. All the solution I found are for .net not the PHP. PHP has no web.config file as far as I concern. Any idea how can I solve it. Thank you Sadi

    Read the article

  • PHP SOAP Windows: maximum string content length quota (8192) has been exceeded while reading XML dat

    - by Sadi
    I am trying to use bing with PHP SOAP. It works fine for short strings. But for larger string I get following error: Fatal error: Uncaught SoapFault exception: [a:DeserializationFailed] The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'Translate'. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 9, position 227. in ........ I am using XAMPP in windows 7. All the solution I found are for .net not the PHP. PHP has no web.config file as far as I concern. Any idea how can I solve it. Thank you Sadi

    Read the article

  • PHP SOAP error: Method element needs to belong to the namespace

    - by kdm
    I'm unable to retrieve data from an XML document, any help is greatly appreciated. I'm using PHP 5.2.10 and the WSDL url is an internal link within my company. The following code produces an error. $url = "http://dta-info/IVR/IVRINFO?WSDL"; $params = array("zANI" => "12345"); try{ $client = new SoapClient($url, array( 'trace' => 1, 'connection_timeout' => 2, 'location' => $url ) ); }catch(SoapFault $fault){ echo "faultstring: {$fault->faultstring})\n"; } try{ $result = $client->GetIVRinfo($params); }catch(SoapFault $fault){ echo "(faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring} )\n"; } (faultcode: SOAP-ENV:Client, faultstring: There should be no path or parameters after a SOAP vname. ) So i tried to use a non-wsdl mode but i receive a different error no matter how i try to format the params. $url = "http://dta-info/IVR/IVRINFO"; $params = array("zANI" => "12345"); try{ $client = new SoapClient(null, array( 'trace' => 1, 'connection_timeout' => 2, 'location' => $url, 'uri' => $uri, 'style' => SOAP_DOCUMENT, 'use' => SOAP_LITERAL, 'soap_version' => SOAP_2 ) ); }catch(SoapFault $fault){ echo "faultstring: {$fault->faultstring})\n"; } try{ $result = $client->GetIVRinfo($params); }catch(SoapFault $fault){ echo "(faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring} )\n"; } (faultcode: SOAP-ENV:Client, faultstring: The method element needs to belong to the namespace 'http://GETIVRINFO/IVR/IVRINFO'. ) I have tested this WSDL with a tool called SoapUI and it returns the results with no errors. So it leads me to believe I'm not formatting the vars or headers correctly with PHP. I also tried passing in a xml fragment as the param but that returns the same error. What am i doing wrong?????? $params = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ivr="http://GETIVRINFO/IVR/IVRINFO"> <soapenv:Header/> <soapenv:Body> <ivr:GetIVRinfo> <!--Optional:--> <ivr:zANI>12345</ivr:zANI> </ivr:GetIVRinfo> </soapenv:Body> </soapenv:Envelope>'; Here is the WSDL document: <?xml version="1.0"?><wsdl:definitions name="IVR" targetNamespace="http://GETIVRINFO/IVR/IVRINFO" xmlns:tns="http://GETIVRINFO/IVR/IVRINFO" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:sql="http://schemas.microsoft.com/SQLServer/2001/12/SOAP" xmlns:sqltypes="http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types" xmlns:sqlmessage="http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlMessage" xmlns:sqlresultstream="http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlResultStream"> <wsdl:types><xsd:schema targetNamespace='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types' elementFormDefault='qualified' attributeFormDefault='qualified'> <xsd:import namespace='http://www.w3.org/2001/XMLSchema'/> <xsd:simpleType name='nonNegativeInteger'> <xsd:restriction base='xsd:int'> <xsd:minInclusive value='0'/> </xsd:restriction> </xsd:simpleType> <xsd:attribute name='IsNested' type='xsd:boolean'/> <xsd:complexType name='SqlRowSet'> <xsd:sequence> <xsd:element ref='xsd:schema'/> <xsd:any/> </xsd:sequence> <xsd:attribute ref='sqltypes:IsNested'/> </xsd:complexType> <xsd:complexType name='SqlXml' mixed='true'> <xsd:sequence> <xsd:any/> </xsd:sequence> </xsd:complexType> <xsd:simpleType name='SqlResultCode'> <xsd:restriction base='xsd:int'> <xsd:minInclusive value='0'/> </xsd:restriction> </xsd:simpleType> </xsd:schema> <xsd:schema targetNamespace='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlMessage' elementFormDefault='qualified' attributeFormDefault='qualified'> <xsd:import namespace='http://www.w3.org/2001/XMLSchema'/> <xsd:import namespace='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types'/> <xsd:complexType name='SqlMessage'> <xsd:sequence minOccurs='1' maxOccurs='1'> <xsd:element name='Class' type='sqltypes:nonNegativeInteger'/> <xsd:element name='LineNumber' type='sqltypes:nonNegativeInteger'/> <xsd:element name='Message' type='xsd:string'/> <xsd:element name='Number' type='sqltypes:nonNegativeInteger'/> <xsd:element name='Procedure' type='xsd:string'/> <xsd:element name='Server' type='xsd:string'/> <xsd:element name='Source' type='xsd:string'/> <xsd:element name='State' type='sqltypes:nonNegativeInteger'/> </xsd:sequence> <xsd:attribute ref='sqltypes:IsNested'/> </xsd:complexType> </xsd:schema> <xsd:schema targetNamespace='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlResultStream' elementFormDefault='qualified' attributeFormDefault='qualified'> <xsd:import namespace='http://www.w3.org/2001/XMLSchema'/> <xsd:import namespace='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types'/> <xsd:import namespace='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlMessage'/> <xsd:complexType name='SqlResultStream'> <xsd:choice minOccurs='1' maxOccurs='unbounded'> <xsd:element name='SqlRowSet' type='sqltypes:SqlRowSet'/> <xsd:element name='SqlXml' type='sqltypes:SqlXml'/> <xsd:element name='SqlMessage' type='sqlmessage:SqlMessage'/> <xsd:element name='SqlResultCode' type='sqltypes:SqlResultCode'/> </xsd:choice> </xsd:complexType> </xsd:schema> <xsd:schema targetNamespace="http://GETIVRINFO/IVR/IVRINFO" elementFormDefault="qualified" attributeFormDefault="qualified"> <xsd:import namespace="http://www.w3.org/2001/XMLSchema"/> <xsd:import namespace="http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types"/> <xsd:import namespace="http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlMessage"/> <xsd:import namespace="http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlResultStream"/> <xsd:element name="GetIVRinfo"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="1" name="zANI" type="xsd:string" nillable="true"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="GetIVRinfoResponse"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="1" maxOccurs="1" name="GetIVRinfoResult" type="sqlresultstream:SqlResultStream"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> <wsdl:message name="GetIVRinfoIn"> <wsdl:part name="parameters" element="tns:GetIVRinfo"/> </wsdl:message> <wsdl:message name="GetIVRinfoOut"> <wsdl:part name="parameters" element="tns:GetIVRinfoResponse"/> </wsdl:message> <wsdl:portType name="SXSPort"> <wsdl:operation name="GetIVRinfo"> <wsdl:input message="tns:GetIVRinfoIn"/> <wsdl:output message="tns:GetIVRinfoOut"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="SXSBinding" type="tns:SXSPort"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="GetIVRinfo"> <soap:operation soapAction="http://GETIVRINFO/IVR/IVRINFO/GetIVRinfo" style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="IVR"> <wsdl:port name="SXSPort" binding="tns:SXSBinding"> <soap:address location="http://GETIVRINFO/IVR/IVRINFO"/> </wsdl:port> </wsdl:service> </wsdl:definitions>

    Read the article

  • How do I access SourceGear Web services using SOAP::Lite?

    - by user565793
    For some reason SourceGear provide an undocumented Web service on their installations. They actually ask developers to use the API instead because the Web service is kinda messy, but this is a problem in my case because I cannot use this API on a Perl environment, so their solution for my specific case is to use the Web service. This shouldn't be a problem. Using SOAP::Lite I have connected to several Web services in the past in the same way. But the lack of documentation is a major chaos if you don't know where the SOAP calls can be made. I only have an XML to decipher where to and how to make these calls. It would be great if a real SOAP genius could help me out in this. This is an example of the login call and the expected response: Request POST /fortress/dragnetwebservice.asmx HTTP/1.1 Host: velecloudserver Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://www.sourcegear.com/schemas/dragnet/LoginPlainText" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <LoginPlainText xmlns="http://www.sourcegear.com/schemas/dragnet"> <strLogin>string</strLogin> <strPassword>string</strPassword> </LoginPlainText> </soap:Body> </soap:Envelope> Response HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <LoginPlainTextResponse xmlns="http://www.sourcegear.com/schemas/dragnet"> <LoginPlainTextResult>int</LoginPlainTextResult> <strAuthTicket>string</strAuthTicket> </LoginPlainTextResponse> </soap:Body> </soap:Envelope> I'm looking for a way to be able to assemble this somehow. This is my Perl example: my $soap = SOAP::Lite -> uri ('http://velecloudserver/fortress/dragnetwebservice.asmx') -> proxy('http://velecloudserver/fortress/dragnetwebservice.asmx/LoginPlainText'); my $som = $soap->call('LoginPlainText', SOAP::Data->name('LoginPlainText')->value( \SOAP::Data->value([ SOAP::Data->name('strLogin')->value( 'admin' ), SOAP::Data->name('strPassword')->value('Adm1234'), ])) ); Any tip would be appreciated.

    Read the article

  • "Error #1006: getAttributeByQName is not a function." Flex 2.0.1 hotfix 2

    - by Deveti Putnik
    Hi, guys! I am working on some old Flex project (Flex 2.0.1 hotfix 2) and I am rookie in Flex programming. So, I wrote code for accessing some ASP.NET web service: <?xml version="1.0" encoding="utf-8"?> [Bindable] public var users:ArrayOfUser; private function buttonClicked():void { mx.controls.Alert.show(dataService.wsdl); dataService.UserGetAll.send();/ } public function dataHandler(event:ResultEvent):void { Alert.show("alo"); var response:ResponseUsers = event.result as ResponseUsers; if (response.responseCode != ResponseCodes.SUCCESS) { mx.controls.Alert.show("Error: " + response.responseCode.toString()); return; } users = response.users; } ]]> <mx:Button label="Click me!" click="buttonClicked()"/> And this is what I get from debugger: WSDL loaded Invoking SOAP operation UserGetAll Encoding SOAP request envelope Encoding SOAP request body 'A97A2DC1-AEDA-C594-45D2-1BA2B0F3B223' producer sending message '10681130-43E7-3DA7-34DD-1BA2B85545E3' 'direct_http_channel' channel sending message: (mx.messaging.messages::SOAPMessage)#0 body = "<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <tns:UserGetAll xmlns:tns="http://tempuri.org/"/> </SOAP-ENV:Body> </SOAP-ENV:Envelope>" clientId = "DirectHTTPChannel0" contentType = "text/xml; charset=utf-8" destination = "DefaultHTTP" headers = (Object)#1 httpHeaders = (Object)#2 SOAPAction = ""http://tempuri.org/UserGetAll"" messageId = "10681130-43E7-3DA7-34DD-1BA2B85545E3" method = "POST" recordHeaders = false timestamp = 0 timeToLive = 0 url = "http://192.168.0.201:8123/Service.asmx" 'A97A2DC1-AEDA-C594-45D2-1BA2B0F3B223' producer acknowledge of '10681130-43E7-3DA7-34DD-1BA2B85545E3'. Decoding SOAP response Encoded SOAP response <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><UserGetAllResponse xmlns="http://tempuri.org/"><UserGetAllResult><ResponseCode>Success</ResponseCode><Users><User><Id>1</Id><Name>test</Name><Key>testKey</Key><IsActive>true</IsActive><Name>Petar i Sofija</Name><Key>123789</Key><IsActive>true</IsActive></User></Users></UserGetAllResult></UserGetAllResponse></soap:Body></soap:Envelope> Decoding SOAP response envelope Decoding SOAP response body And finally I get this error "Error #1006: getAttributeByQName is not a function.". As you can see, I get correct response from web service, but dataHandler function is never got called. Can anyone please help me out? Thanks, Deveti Putnik

    Read the article

  • How to view ASMX SOAP using Fiddler2?

    - by outer join
    Does anyone know if Fiddler can display the raw SOAP messages for ASMX web services? I'm testing a simple web service using both Fiddler2 and Storm and the results vary (Fiddler shows plain xml while Storm shows the SOAP messages). See sample request/responses below: Fiddler2 Request: POST /webservice1.asmx/Test HTTP/1.1 Accept: */* Referer: http://localhost.:4164/webservice1.asmx?op=Test Accept-Language: en-us User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; MS-RTC LM 8) Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate Host: localhost.:4164 Content-Length: 0 Connection: Keep-Alive Pragma: no-cache Fiddler2 Response: HTTP/1.1 200 OK Server: ASP.NET Development Server/9.0.0.0 Date: Thu, 21 Jan 2010 14:21:50 GMT X-AspNet-Version: 2.0.50727 Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Content-Length: 96 Connection: Close <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://tempuri.org/">Hello World</string> Storm Request (body only): <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <Test xmlns="http://tempuri.org/" /> </soap:Body> </soap:Envelope> Storm Response: Status Code: 200 Content Length : 339 Content Type: text/xml; charset=utf-8 Server: ASP.NET Development Server/9.0.0.0 Status Description: OK <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <TestResponse xmlns="http://tempuri.org/"> <TestResult>Hello World</TestResult> </TestResponse> </soap:Body> </soap:Envelope> Thanks for any help.

    Read the article

  • Is SOAP Http POST more complicated than I thought

    - by Pete Petersen
    I'm currently writing a bit of code to send some xml data to a web service via HTTP POST. I thought this would be really simple and have written the following example code (C#) Console.WriteLine("Press enter to send data..."); while (Console.ReadLine() != "q") { HttpWebRequest httpWReq = (HttpWebRequest)WebRequest.Create(@"http://localhost:8888/"); Foo fooItem = new Foo { Member1 = "05", Member2 = "74455604", Member3 = "15101051", Member4 = 1, Member5 = "fsf", Member6 = 6.52, }; ASCIIEncoding encoding = new ASCIIEncoding(); string postData = fooItem.ToXml(); byte[] data = encoding.GetBytes(postData); httpWReq.Method = "POST"; httpWReq.ContentType = "application/xml"; httpWReq.ContentLength = data.Length; using (Stream stream = httpWReq.GetRequestStream()) { stream.Write(data, 0, data.Length); } HttpWebResponse response = (HttpWebResponse)httpWReq.GetResponse(); string responseString = new StreamReader(response.GetResponseStream()).ReadToEnd(); Console.WriteLine("Received " + responseString); Console.WriteLine("Press enter to send data..."); } This is all I thought would be necessary, however I have now been given the details for the web service. This included some information which is unfarmiliar to me and I'm unsure whether I need to include it. The information I was sent was <url>http://sometext/soap/rpc</url> <namespace>http://sometext/a.services</namespace> <method>receiveInfo</method> <parm-id>xmldata</parm-id> (Input data) (Actual XML data as string) <parm-id>status</parm-id> (Output data) <userid>user</userid> <password>pass</password> <secure>false</secure> I guess this means I need to include a username and password somehow, but I'm not sure what the namespace or method fields are used for. Could anyone give me a hint? Sorry I've never used webservices before.

    Read the article

  • Axis/SOAP service styles and interoperability

    - by Thilo
    There are four "styles" of service in Axis. RPC services use the SOAP RPC conventions, and also the SOAP "section 5" encoding. Document services do not use any encoding (so in particular, you won't see multiref object serialization or SOAP-style arrays on the wire) but DO still do XML<-Java databinding. Wrapped services are just like document services, except that rather than binding the entire SOAP body into one big structure, they "unwrap" it into individual parameters. Message services receive and return arbitrary XML in the SOAP Envelope without any type mapping / data binding. If you want to work with the raw XML of the incoming and outgoing SOAP Envelopes, write a message service. So, if I use anything else except the first option(SOAP RPC Section 5), how does this impact interoperability? If someone says they want a SOAP service (including WSDL), does this mean that SOAP RPC conventions are expected? Can the other three styles still be used when the other end is not implemented with Axis?

    Read the article

  • Configuring a WCF Client to Use UserName Credentials On the Request and Check Certificate Credential

    - by AlEl
    I'm trying to use WCF to consume a web service provided by a third-party's Oracle Application Server. I pass a username and password in a UsernameToken as part of the request and as part of the response the web service returns a standard security tag in the header which includes a digest and signature. With my current setup, I successfully send a request to the server and the web service sends the expected response data back. However, when parsing the response WCF throws a MessageSecurityException, with an InnerException.Message of "Supporting token signatures not expected." My guess is that WCF wants me to configure it to handle the signature and verify it. I have a certificate from the third party that hosts the web service that I should be able to use to verify the signature, although I'm not sure if I'll need it. Here's a sample header from a response that makes WCF throw the exception: <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <dsig:Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"> <dsig:SignedInfo> <dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <dsig:Reference URI="#_51IUwNWRVvPOcz12pZHLNQ22"> <dsig:Transforms> <dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <dsig:DigestValue> [DigestValue here] </dsig:DigestValue> </dsig:Reference> <dsig:Reference URI="#_dI5j0EqxrVsj0e62J6vd6w22"> <dsig:Transforms> <dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <dsig:DigestValue> [DigestValue here] </dsig:DigestValue> </dsig:Reference> </dsig:SignedInfo> <dsig:SignatureValue> [Signature Value Here] </dsig:SignatureValue> <dsig:KeyInfo> <wsse:SecurityTokenReference xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:Reference URI="#BST-9nKWbrE4LRv6maqstrGuUQ22" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/> </wsse:SecurityTokenReference> </dsig:KeyInfo> </dsig:Signature> <wsse:BinarySecurityToken ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" wsu:Id="BST-9nKWbrE4LRv6maqstrGuUQ22" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> [Security Token Here] </wsse:BinarySecurityToken> <wsu:Timestamp wsu:Id="_dI5j0EqxrVsj0e62J6vd6w22" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsu:Created>2010-05-26T18:46:30Z</wsu:Created> </wsu:Timestamp> </wsse:Security> </soap:Header> <soap:Body wsu:Id="_51IUwNWRVvPOcz12pZHLNQ22" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> [Body content here] </soap:Body> </soap:Envelope> My binding configuration looks like: <basicHttpBinding> <binding name="myBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="TransportWithMessageCredential"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> I think that basically what I have to do is configure WCF to use UserName client credentials in the request and Certificate client credentials in the response. I don't know how to do this though. I'm new at WCF, so I'm sorry if this is a bit of a dumb question. I've been trying to Google solutions, but there seem to be so many different ways to configure WCF that I'm getting overwhelmed. Thanks in advance!

    Read the article

  • PHP AND SOAP. Change envelope

    - by Oleg
    Hi All!!! It is many questions there about PHP and SOAP. But I am not found answer on my situation. So. I use PHP SoapClient and WSDL for it. Object sends this: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.site.com"><SOAP-ENV:Body> But I need this: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body> Question. How I can do this with standard PHP class SoapClient? Thank you.

    Read the article

  • How to consume PHP SOAP service using WCF

    - by mr.b
    I am new in web services so apologize me if I am making some cardinal mistake here, hehe. I have built SOAP service using PHP. Service is SOAP 1.2 compatible, and I have WSDL available. I have enabled sessions, so that I can track login status, etc. I don't need some super security here (ie message-level security), all I need is transport security (HTTPS), since this service will be used infrequently, and performances are not so much of an issue. I am having difficulties making it to work at all. C# throws some unclear exception ("Server returned an invalid SOAP Fault. Please see InnerException for more details.", which in turn says "Unbound prefix used in qualified name 'rpc:ProcedureNotPresent'."), but consuming service using PHP SOAP client behaves as expected (including session and all). So far, I have following code. note: due to amount of real code, I am posting minimal code configuration PHP SOAP server (using Zend Soap Server library), including class(es) exposed via service: <?php class Verification_LiteralDocumentProxy { protected $instance; public function __call($methodName, $args) { if ($this->instance === null) { $this->instance = new Verification(); } $result = call_user_func_array(array($this->instance, $methodName), $args[0]); return array($methodName.'Result' => $result); } } class Verification { private $guid = ''; private $hwid = ''; /** * Initialize connection * * @param string GUID * @param string HWID * @return bool */ public function Initialize($guid, $hwid) { $this->guid = $guid; $this->hwid = $hwid; return true; } /** * Closes session * * @return void */ public function Close() { // if session is working, $this->hwid and $this->guid // should contain non-empty values } } // start up session stuff $sess = Session::instance(); require_once 'Zend/Soap/Server.php'; $server = new Zend_Soap_Server('https://www.somesite.com/api?wsdl'); $server->setClass('Verification_LiteralDocumentProxy'); $server->setPersistence(SOAP_PERSISTENCE_SESSION); $server->handle(); WSDL: <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="https://www.somesite.com/api" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="Verification" targetNamespace="https://www.somesite.com/api"> <types> <xsd:schema targetNamespace="https://www.somesite.com/api"> <xsd:element name="Initialize"> <xsd:complexType> <xsd:sequence> <xsd:element name="guid" type="xsd:string"/> <xsd:element name="hwid" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="InitializeResponse"> <xsd:complexType> <xsd:sequence> <xsd:element name="InitializeResult" type="xsd:boolean"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="Close"> <xsd:complexType/> </xsd:element> </xsd:schema> </types> <portType name="VerificationPort"> <operation name="Initialize"> <documentation> Initializes connection with server</documentation> <input message="tns:InitializeIn"/> <output message="tns:InitializeOut"/> </operation> <operation name="Close"> <documentation> Closes session between client and server</documentation> <input message="tns:CloseIn"/> </operation> </portType> <binding name="VerificationBinding" type="tns:VerificationPort"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="Initialize"> <soap:operation soapAction="https://www.somesite.com/api#Initialize"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="Close"> <soap:operation soapAction="https://www.somesite.com/api#Close"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <service name="VerificationService"> <port name="VerificationPort" binding="tns:VerificationBinding"> <soap:address location="https://www.somesite.com/api"/> </port> </service> <message name="InitializeIn"> <part name="parameters" element="tns:Initialize"/> </message> <message name="InitializeOut"> <part name="parameters" element="tns:InitializeResponse"/> </message> <message name="CloseIn"> <part name="parameters" element="tns:Close"/> </message> </definitions> And finally, WCF C# consumer code: [ServiceContract(SessionMode = SessionMode.Required)] public interface IVerification { [OperationContract(Action = "Initialize", IsInitiating = true)] bool Initialize(string guid, string hwid); [OperationContract(Action = "Close", IsInitiating = false, IsTerminating = true)] void Close(); } class Program { static void Main(string[] args) { WSHttpBinding whb = new WSHttpBinding(SecurityMode.Transport, true); ChannelFactory<IVerification> cf = new ChannelFactory<IVerification>( whb, "https://www.somesite.com/api"); IVerification client = cf.CreateChannel(); Console.WriteLine(client.Initialize("123451515", "15498518").ToString()); client.Close(); } } Any ideas? What am I doing wrong here? Thanks!

    Read the article

  • Should my WCF webservice return a 500 or 200 http code (soap fault / functional return message)

    - by Tim Mahy
    Hi all, after reading the SOAP specs, it states that a SOAP Fault should return a http 500 errorcode, so when a SoapException is thrown, WCF returns a 500 error code. Now, I'm looking for some best practices to when return a functional soap error message and when to return a SOAP Fault. What would you guys return when a functional error occurred while processing the message because of the input message contains some functional errors, a 500 SOAP Fault or a 200 Soap response containing some error message ?

    Read the article

  • SOAP Request using Java

    - by user224270
    I have been trying to send a request through soapui and I always keep getting the following error message: <soap:Body> <soap:Fault> <faultcode>soap:Client</faultcode> <faultstring>Failed to process SOAP request. SOAP body not in UTF-16.</faultstring> <detail> <wsdl_ops:error>Failed to process SOAP request. SOAP body not in UTF-16.</wsdl_ops:error> </detail> </soap:Fault> Has anyone run into the same issue before?

    Read the article

  • how to read http response soap headers from web service response in proxy class

    - by Fabricio
    I'm having some problems with one webservice that i'm working with. I generated a proxy class with wsdl.exe that comes with .net framework. But that webservice return a header that isnt not mapped by the wsdl. I must map the header sop because it contains some properties that i have to read and work with. how can i read the soap's header collection? Ex.: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header xmlns="http://xml.amadeus.com/ws/2009/01/WBS_Session-2.0.xsd"> <Session> <SessionId>545784545</SessionId> <SequenceNumber>1</SequenceNumber> <SecurityToken>asd7a87sda89sd45as4d5a4</SecurityToken> </Session> </soap:Header> <soap:Body> <TAM_Altea_Seguranca_AutenticarRS xmlns="http://xml.amadeus.com/2009/04/TAM/TAM_Altea_Seguranca_AutenticarRS_2.0"> <statusDoProcesso> <codigoDoStatus>P</codigoDoStatus> </statusDoProcesso> </TAM_Altea_Seguranca_AutenticarRS> </soap:Body> </soap:Envelope> I need to read the SOAP:HEADER - Session.

    Read the article

  • Strange problems with PHP SOAP (private variable not persist + variables passed from client not work

    - by Tamas Gal
    I have a very strange problems in a PHP Soap implementation. I have a private variable in the Server class which contains the DB name for further reference. The private variable name is "fromdb". I have a public function on the soap server where I can set this variable. $client-setFromdb. When I call it form my client works perfectly and the fromdb private variable can be set. But a second soap client call this private variable loses its value... Here is my soap server setup: ini_set('soap.wsdl_cache_enabled', 0); ini_set('session.auto_start', 0); ini_set('always_populate_raw_post_data', 1); global $config_dir; session_start(); /*if(!$HTTP_RAW_POST_DATA){ $HTTP_RAW_POST_DATA = file_get_contents('php://input'); }*/ $server = new SoapServer("{$config_dir['template']}import.wsdl"); $server-setClass('import'); $server-setPersistence(SOAP_PERSISTENCE_SESSION); $server-handle(); Problem is that I passed this to the server: $client = new SoapClient('http://import.ingatlan.net/wsdl', array('trace' = 1)); $xml=''; $xml.=''; $xml.=''; $xml.=''; $xml.='Valaki'; $xml.=''; $xml.=''; $xml.=''; $xml.=''; $tarray = array("type" = 1, "xml" = $xml); try{ $s = $client-sendXml( $tarray ); print "$s"; } catch( SOAPFault $exception){ print "--- SOAP exception :{$exception}---"; print "LAST REQUEST :"; var_dump($client-_getLastRequest()); print "---"; print "LAST RESPONSE :".$client-_getLastResponse(); } So passed an Array of informations to the server. Then I got this exception: LAST REQUEST : <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><type>Array</type><xml/></SOAP-ENV:Body></SOAP-ENV:Envelope> Can you see the Array word between the type tag? Seems that the client only passed a reference or something like this. So I totaly missed :(

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >