Search Results

Search found 813 results on 33 pages for 'wsdl'.

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

  • How to Call methods I see in a wsdl file someone linked me to?

    - by Derek
    Hi all, I am not a Java programmer by trade. C and Fortran mostly. However, I have this one-off project someone wants done. Connect to some web-based database and retrieve some data from it. I asked around, and someone finally linked me to a WSDL page. I click on this link, and I see a huge XML looking file. If I am writing a stand-alone java application, how do I go about calling these (promising looking) method names that I see in the wsdl. You know "getCoordinates" is there, but i have no idea how to call that method. After googling, I am finding a lot of different ways, and I am not sure what is the best way for my simple application. Thanks

    Read the article

  • Why would a WebService return nulls when the actual service returns data?

    - by Jerry
    I have a webservice (out of my control) that I have to talk to. I also have a packet-sniffer on the line, and (SURPRISE!!!) the developers of the webservice aren't lying. They are actually sending back all of the data that I requested. But the web-service code that is auto-generated from the WSDL file is giving me "null" as a value. I used their WSDL file to generate my Web Reference. I checked my data types with the datatypes that the WSDL file has declared. And I used the code as listed below to perform the calls: DT_MaterialMaster_LookupRequest req = new DT_MaterialMaster_LookupRequest(); req.MaterialNumber = "101*"; req.DocumentNo = ""; req.Description = "Pipe*"; req.Plant = "0000"; MI_MaterialMaster_Lookup_OBService srv = new MI_MaterialMaster_Lookup_OBService(); DT_MaterialMaster_Response resp = srv.MI_MaterialMaster_Lookup_OB(new DT_MaterialMaster_LookupRequest[] { req }); // Note that the response here is ALWAYS null!! Console.WriteLine(resp.Status); The resp object is an actual object. It was generated properly. However, the Status and MaterialData fields are always null. When I call the web service, I've placed a packet-sniffer on the line, and I can see that I've sent the following (linebreaks and indentions for my own sanity): <?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> <MT_MaterialMaster_Lookup xmlns="http://MyCompany.com/SomeCompany/mm/MaterialMasterSearch"> <Request xmlns=""> <MaterialNumber>101*</MaterialNumber> <Description>Pipe*</Description> <DocumentNo /> <Plant>0000</Plant> </Request> </MT_MaterialMaster_Lookup> </soap:Body> </soap:Envelope> The response that they send back SEEMS to be a valid response (linebreaks and indentions for my own sanity): <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'> <SOAP:Header /> <SOAP:Body> <n0:MT_MaterialMaster_Response xmlns:n0='http://MyCompany.com/SomeCompany/mm/MaterialMasterSearch' xmlns:prx='urn:SomeCompany.com:proxy:BRD:/1SAI/TAS4FE14A2DE960D61219AE:701:2009/02/10'> <Response> <Status>No Rows Found</Status> <MaterialData /> </Response> </n0:MT_MaterialMaster_Response> </SOAP:Body> </SOAP:Envelope> The status shows that it actually received data... but the resp.Status and resp.MaterialData fields are always null. What have I done wrong? UPDATE: The WSDL file is defined as: <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:p1="http://MyCompany.com/SomeCompany/mm/MaterialMasterSearch" name="MI_MaterialMaster_Lookup_AutoCAD_OB" targetNamespace="http://MyCompany.com/SomeCompany/mm/MaterialMasterSearch" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <xsd:schema xmlns="http://MyCompany.com/SomeCompany/mm/MaterialMasterSearch" targetNamespace="http://MyCompany.com/SomeCompany/mm/MaterialMasterSearch" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="MT_MaterialMaster_Response" type="p1:DT_MaterialMaster_Response" /> <xsd:element name="MT_MaterialMaster_Lookup" type="p1:DT_MaterialMaster_Lookup" /> <xsd:complexType name="DT_MaterialMaster_Response"> <xsd:sequence> <xsd:element name="Status" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">d48d03b040af11df99e300145eccb24e</xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element maxOccurs="unbounded" name="MaterialData"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">64908aa040a511df843700145eccb24e</xsd:appinfo> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name="MaterialNumber" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">64908aa140a511df848500145eccb24e</xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element minOccurs="0" name="Description" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">64908aa240a511df95bf00145eccb24e</xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element minOccurs="0" name="DocumentNo" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">64908aa340a511dfb23700145eccb24e</xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element minOccurs="0" name="UOM" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">3b5f14c040a611df9fbe00145eccb24e</xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element minOccurs="0" name="Hierarchy" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">64908aa440a511dfc65b00145eccb24e</xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element minOccurs="0" name="Plant" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">d48d03b140af11dfb78e00145eccb24e</xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element minOccurs="0" name="Procurement" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">d48d03b240af11dfb87b00145eccb24e</xsd:appinfo> </xsd:annotation> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="DT_MaterialMaster_Lookup"> <xsd:sequence> <xsd:element maxOccurs="unbounded" name="Request"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">64908aa040a511df843700145eccb24e</xsd:appinfo> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="0" name="MaterialNumber" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">64908aa140a511df848500145eccb24e</xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element minOccurs="0" name="Description" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">64908aa240a511df95bf00145eccb24e</xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element minOccurs="0" name="DocumentNo" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">64908aa340a511dfb23700145eccb24e</xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element minOccurs="0" name="Plant" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="http://SomeCompany.com/xi/TextID">64908aa440a511dfc65b00145eccb24e</xsd:appinfo> </xsd:annotation> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:schema> </wsdl:types> <wsdl:message name="MT_MaterialMaster_Lookup"> <wsdl:part name="MT_MaterialMaster_Lookup" element="p1:MT_MaterialMaster_Lookup" /> </wsdl:message> <wsdl:message name="MT_MaterialMaster_Response"> <wsdl:part name="MT_MaterialMaster_Response" element="p1:MT_MaterialMaster_Response" /> </wsdl:message> <wsdl:portType name="MI_MaterialMaster_Lookup_AutoCAD_OB"> <wsdl:operation name="MI_MaterialMaster_Lookup_AutoCAD_OB"> <wsdl:input message="p1:MT_MaterialMaster_Lookup" /> <wsdl:output message="p1:MT_MaterialMaster_Response" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="MI_MaterialMaster_Lookup_AutoCAD_OBBinding" type="p1:MI_MaterialMaster_Lookup_AutoCAD_OB"> <binding transport="http://schemas.xmlsoap.org/soap/http" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" /> <wsdl:operation name="MI_MaterialMaster_Lookup_AutoCAD_OB"> <operation soapAction="http://SomeCompany.com/xi/WebService/soap1.1" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" /> <wsdl:input> <body use="literal" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" /> </wsdl:input> <wsdl:output> <body use="literal" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="MI_MaterialMaster_Lookup_AutoCAD_OBService"> <wsdl:port name="MI_MaterialMaster_Lookup_AutoCAD_OBPort" binding="p1:MI_MaterialMaster_Lookup_AutoCAD_OBBinding"> <address location="http://bxdwas.MyCompany.com/XISOAPAdapter/MessageServlet?channel=:AutoCAD:SOAP_SND_Material_Lookup" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" /> </wsdl:port> </wsdl:service> </wsdl:definitions>

    Read the article

  • How to handle SalesForce WSDL files for sandbox and production sites in ASP.Net?

    - by Traveling Tech Guy
    I need to authenticate users and get info about them from an ASP.Net application. Since I have 2 sites (sandbox, production) and 2 org IDs - I needed to generate 2 SalesForce WSDL files. I diffed the 2 files (each about 600kb in size) and while they are 95% the same, there are enough differences strewn all over the place - enough for me to need to use them both. I added both as web references to my solution, and here's where my problem starts.Obviously, I cannot use both references in the same file, as they contain the same classes/functions. I had to write a quick-and-dirty solution over the weekend, so I just created 2 classes - each using a different web reference - but otherwise the exact functionality, and I use the appropriate one, based on the URL the user is coming from. This works well, but strikes me as a bad (read: quick-and-dirty) solution. My question: is there any way to do one or more of the following: change the web reference on the fly? use both web references in the same file, but put one in a different namespace? find a better solution to the whole situation? I nd up with a huge XmlSerializer.dll (3mb!) - probably due to using both huge WSDL files. Thanks for your time.

    Read the article

  • Using Cloud OER to Find Fusion Applications On-Premise Service Concrete WSDL URL by Rajesh Raheja

    - by JuergenKress
    In my previous post on Fusion Applications Integration, the Fusion Applications OER white paper explains Oracle Enterprise Repository (OER) usage in the applications context, assuming a dedicated OER for your Fusion Applications instance (whether cloud/SaaS or on-premise). Having a dedicated OER instance is recommended as it can provide customized service metadata and can be used for overall SOA governance in addition to simple service discovery. One of the common queries I get is how on-premise customers without a dedicated OER can find a concrete service WSDL URL for their specific environment using the cloud hosted OER instance. Read the full article here. SOA & BPM Partner Community For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit  www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center. Blog Twitter LinkedIn Mix Forum Technorati Tags: OER,SOA Governance,SOA Community,Oracle SOA,Oracle BPM,BPM,Community,OPN,Jürgen Kress

    Read the article

  • Silverlight 4 + RIA Services - Ready for Business: Exposing WCF (SOAP\WSDL) Services

    Continuing in our series, I wanted to touch on how a RIA Services can be exposed as a Soap\WSDL service.   This is very useful if you want to enable the exact same business logic\data access logic is available to clients other than Silverlight.    For example to a WinForms application or WPF or even a console application.  SOAP is a particularly good model for interop with the Java\JEE world as well.    First you need to add a reference to Microsoft.ServiceModel.DomainSerivves.Hosting.EndPoints...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Silverlight 4 + RIA Services - Ready for Business: Exposing WCF (SOAP\WSDL) Services

    Continuing in our series, I wanted to touch on how a RIA Services can be exposed as a Soap\WSDL service.   This is very useful if you want to enable the exact same business logic\data access logic is available to clients other than Silverlight.    For example to a WinForms application or WPF or even a console application.  SOAP is a particularly good model for interop with the Java\JEE world as well.    First you need to add a reference to Microsoft.ServiceModel.DomainSerivves.Hosting.EndPoints...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • WSDL vs DLL. Which is better?

    - by Lopper
    I would like to create a reusable interface to transfer some proprietary information over the TCP/IP connection. If given only the choice of either WSDL or DLL, what are the pros and cons of using each? This is assuming that Windows OS is used.

    Read the article

  • Clickatell SOAP wsdl to JAXB java classes

    - by timvb
    Hi all, I'm trying to generate JAXB classes from the Clickatell wsdl: You can find the wsdl definition here it quite large: http://api.clickatell.com/soap/webservice.php?WSDL When trying to generate java classes from this Wsdl i got the following errors: [ERROR] undefined simple or complex type 'SOAP-ENC:Array' [ERROR] undefined attribute 'SOAP-ENC:arrayType' I hope someone can help me out. Cheers, Tim

    Read the article

  • How to deal with transport level security policy with OSB

    - by Jian Liang
    Recently, we received a use case for Oracle Service Bus (OSB) 11gPS4 to consume a Web Service which is secured by HTTP transport level security policy. The WSDL of the remote web service looks like following where the part marked in red shows the security policy: <?xml version='1.0' encoding='UTF-8'?> <definitions xmlns:wssutil="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="https://httpsbasicauth" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="https://httpsbasicauth" name="HttpsBasicAuthService"> <wsp:UsingPolicy wssutil:Required="true"/> <wsp:Policy wssutil:Id="WSHttpBinding_IPartyServicePortType_policy"> <wsp:ExactlyOne> <wsp:All> <ns1:TransportBinding xmlns:ns1="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> <wsp:Policy> <ns1:TransportToken> <wsp:Policy> <ns1:HttpsToken RequireClientCertificate="false"/> </wsp:Policy> </ns1:TransportToken> <ns1:AlgorithmSuite> <wsp:Policy> <ns1:Basic256/> </wsp:Policy> </ns1:AlgorithmSuite> <ns1:Layout> <wsp:Policy> <ns1:Strict/> </wsp:Policy> </ns1:Layout> </wsp:Policy> </ns1:TransportBinding> <ns2:UsingAddressing xmlns:ns2="http://www.w3.org/2006/05/addressing/wsdl"/> </wsp:All> </wsp:ExactlyOne> </wsp:Policy> <types> <xsd:schema> <xsd:import namespace="https://proxyhttpsbasicauth" schemaLocation="http://localhost:7001/WS/HttpsBasicAuthService?xsd=1"/> </xsd:schema> <xsd:schema> <xsd:import namespace="https://httpsbasicauth" schemaLocation="http://localhost:7001/WS/HttpsBasicAuthService?xsd=2"/> </xsd:schema> </types> <message name="echoString"> <part name="parameters" element="tns:echoString"/> </message> <message name="echoStringResponse"> <part name="parameters" element="tns:echoStringResponse"/> </message> <portType name="HttpsBasicAuth"> <operation name="echoString"> <input message="tns:echoString"/> <output message="tns:echoStringResponse"/> </operation> </portType> <binding name="HttpsBasicAuthSoapPortBinding" type="tns:HttpsBasicAuth"> <wsp:PolicyReference URI="#WSHttpBinding_IPartyServicePortType_policy"/> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <operation name="echoString"> <soap:operation soapAction=""/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <service name="HttpsBasicAuthService"> <port name="HttpsBasicAuthSoapPort" binding="tns:HttpsBasicAuthSoapPortBinding"> <soap:address location="https://localhost:7002/WS/HttpsBasicAuthService"/> </port> </service> </definitions> The security assertion in the WSDL (marked in red) indicates that this is the HTTP transport level security policy which requires one way SSL with default authentication (aka. basic authenticate with username/password). Normally, there are two ways to handle web service security policy with OSB 11g: Use WebLogic 9.x policy Use OWSM Since OSB doesn’t support WebLogic 9.x WSSP transport level assertion (except for WS transport), when we tried to create the business service based on the imported WSDL, OSB complained with the following message: [OSB Kernel:398133]The service is based on WSDL with Web Services Security Policies that are not natively supported by Oracle Service Bus. Please select OWSM Policies - From OWSM Policy Store option and attach equivalent OWSM security policy. For the Business Service, either you can add the necessary client policies manually by clicking Add button or you can let Oracle Service Bus automatically pick and add compatible client policies by clicking Add Compatible button. Unfortunately, when tried with OWSM, we couldn’t find http_token_policy from OWSM since OSB PS4 doesn’t support OWSM http_token_policy. It seems that we ran into an unsupported situation that no appropriate policy can be used from both WebLogic and OWSM. As this security policy requires one way SSL with basic authentication at the transport level, a possible workaround is to meet the remote service's requirement at transport level without using web service policy. We can simply use OSB to establish SSL connection and provide username/password for authentication at the transport level to the remote web service. In this case, the business service within OSB will be transparent to the web service policy. However, we still need to deal with OSB console’s complaint related to unsupported security policy because the failure of WSDL validation prohibits OSB console to move forward. With the help from OSB Product Management team, we finally came up with the following solutions: Solution 1: OSB PS5 The good news is that the http_token_policy is made available in OSB PS5. With OSB PS5, you can simply add OWSM oracle/wss_http_token_over_ssl_client_policy to the business service. The simplest solution is to upgrade to OSB PS5 where the OWSM solution is provided out of the box. But if you are not in a position where upgrading is an immediate option, you might want to consider other two workaround solutions described below. Solution 2: Modifying WSDL This solution addresses OSB console’s complaint by removing the security policy from the imported WSDL within OSB. Without the security policy, OSB console allows the business service to be created based on modified WSDL.  Please bear in mind, modifying WSDL is done only for the OSB side via OSB console, no change is required on the remote Web Service. The main steps of this solution: Connect to OSB console import the remote WSDL into OSB remove security assertion (the red marked part) from the imported WSDL create a service account. In our sample, we simply take the user weblogic create the business service and check "Basic" for Authentication and select the created service account make sure that OSB consumes the web service via https. This solution requires modifying WSDL. It is suitable for any OSB version (10g or OSB 11g version) prior to PS5 without OWSM. However, modifying WSDL by hand is troublesome as it requires the user to remember that the original WSDL was edited.  It forces you to make the same edit each time you want to re-import the service WSDL when changes occur at the service level. This also prevents you from using UDDI to import WSDL.  Solution 3: Using original WSDL This solution keeps the WSDL intact and ignores the embedded policy by using OWSM. By design, OWSM doesn’t like WSDL with embedded security assertion. Since OWSM doesn’t provide the feature to explicitly ignore the embedded policy from a remote WSDL, in this solution, we use OWSM in a tricky way to ignore the embedded policy. Connect to OSB console import the remote WSDL into OSB create a service account create the business service in which check "Basic" for Authentication and select the created service account as the imported WSDL is intact, the OSB Kernel:398133 error is expected ignore this error message for the moment and navigate to the Policies Page of business service Select “From OWSM Policy Store” and click “Add” button, the list of policies will pop-up Here is the tricky part: select an arbitrary policy, and click “Cancel” Update and save By clicking “Cancel’ button, we didn’t add any OWSM policy to business service, but the embedded policy is ignored. Yes, this is tricky. According to Oracle OSB Product Manager, the future release of OWSM will add a button “None” which allows to ignore the embedded policy explicitly. This solution keeps the imported WSDL intact which is the big advantage over the solution 2. It is suitable for OSB 11g (version prior to PS5) domain with OWSM configured. This blog addressed the unsupported transport level web service security policy with OSB PS4. To summarize, if you are using OSB PS5 or in a position to upgrade to PS5, the recommendation is to use OWSM OOTB transport level security policy directly. With the release prior to 11g PS5, you can consider the solution 2 or 3 depending on if OWSM is configured.

    Read the article

  • operation specified in binding is not defined for 'Porttype', but it is there, wsdl.. help..

    - by adnan
    Hi guys... this thing is driving me crazy... Whenever I try to validate it.. it gives me error at <wsdl:operation name="ComposedClassOpt"> complete definition is below... that "The operation specified for the 'Binding' binding is not defined for port type 'ComposedClassPortType'. All operations specified in this binding must be defined in port type 'ComposedClassPortType'." But the operation is in the PortType plz thank you. <?xml version="1.0" encoding="UTF-8"?>

    Read the article

  • How to create arrayType for WSDL in Python (using suds)?

    - by Uri
    Environment: Python v2.6.2 suds v0.3.7 The WSDL (server) I work with, have the following schema sub-sections (I tried to write it clearly using plain text) - [ sub-section #1 ] searchRequest: (searchRequest){ userIdentification = (userIdentification){ username = "" password = "" } itineraryArr = (itineraryArray){ _arrayType = "" _offset = "" _id = "" _href = "" _arrayType = "" } ... ... [ sub-section #2 ] itinerary: (itinerary){ departurePoint = (locationPoint){ locationId = None radius = None } arrivalPoint = (locationPoint){ locationId = None radius = None } ... ... There is no problem with 'userIdentification' (which is a "simple" type) But, 'itineraryArr' is an array of 'itinerary', and I don't know how to use python to create XML array. I tried few combinations, for example itinerary0 = self.client.factory.create('itinerary') itineraryArray = self.client.factory.create('itineraryArray') itineraryArray = [itinerary0] searchRequest.itineraryArr = itineraryArray But all my trials resulted with the same server error - Server raised fault: 'Cannot use object of type itinerary as array' (Fault){ faultcode = "SOAP-ENV:Server" faultstring = "Cannot use object of type itinerary as array" } Appreciate you help..... Thanks, Uri

    Read the article

  • IWAB0399E Error in generating Java from WSDL: java.io.IOException: ERROR: Missing <soap:fault> elem

    - by DanO
    I have a WCF 4.0 service for internal use. Another team is trying to consume it in Java. IWAB0399E Error in generating Java from WSDL: java.io.IOException: ERROR: Missing <soap:fault> element inFault "PasswordReuseFaultFault" ... One source suggests it may be a Soap 1.1 vs. Soap 1.2 issue Indeed my WCF generated WSDL <wsdl:fault name="PasswordReuseFaultFault"> <wsp:PolicyReference URI="#blah_blah_blah_PasswordReuseFaultFault_Fault"/> <soap12:fault name="PasswordReuseFaultFault" use="literal"/> </wsdl:fault> notice the <soap12:fault>instead of the expected <soap:fault> I'm pretty sure that is the cause of the problem. How do I get WCF to generate soap 1.1 WSDL ? or What should I tell the Java team to do so their tools can understand the newer protocol?

    Read the article

  • How to call a WCF service using ksoap2 on android?

    - by Qing
    Hi all, Here is my code import org.ksoap2.*; import org.ksoap2.serialization.*; import org.ksoap2.transport.*; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class ksop2test extends Activity { /** Called when the activity is first created. */ private static final String METHOD_NAME = "SayHello"; // private static final String METHOD_NAME = "HelloWorld"; private static final String NAMESPACE = "http://tempuri.org"; // private static final String NAMESPACE = "http://tempuri.org"; private static final String URL = "http://192.168.0.2:8080/HelloWCF/Service1.svc"; // private static final String URL = "http://192.168.0.2:8080/webservice1/Service1.asmx"; final String SOAP_ACTION = "http://tempuri.org/IService1/SayHello"; // final String SOAP_ACTION = "http://tempuri.org/HelloWorld"; TextView tv; StringBuilder sb; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); tv = new TextView(this); sb = new StringBuilder(); call(); tv.setText(sb.toString()); setContentView(tv); } public void call() { try { SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("name", "Qing"); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); androidHttpTransport.call(SOAP_ACTION, envelope); sb.append(envelope.toString() + "\n");//cannot get the xml request send SoapPrimitive result = (SoapPrimitive)envelope.getResponse(); //to get the data String resultData = result.toString(); // 0 is the first object of data sb.append(resultData + "\n"); } catch (Exception e) { sb.append("Error:\n" + e.getMessage() + "\n"); } } } I can successfully access .asmx service, but when I try to call a wcf service the virtual machine said : Error: expected:END_TAG{http://schemas.xmlsoap.org/soap/envelope/}Body(position:END_TAG@1:712 in java.io.InputStreamReader@43ba6798 How to print what the request send? Here is the wcf wsdl: <wsdl:definitions name="Service1" targetNamespace="http://tempuri.org/"> - <wsdl:types> - <xsd:schema targetNamespace="http://tempuri.org/Imports"> <xsd:import schemaLocation="http://para-bj.para.local:8080/HelloWCF/Service1.svc?xsd=xsd0" namespace="http://tempuri.org/"/> <xsd:import schemaLocation="http://para-bj.para.local:8080/HelloWCF/Service1.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/> </xsd:schema> </wsdl:types> - <wsdl:message name="IService1_SayHello_InputMessage"> <wsdl:part name="parameters" element="tns:SayHello"/> </wsdl:message> - <wsdl:message name="IService1_SayHello_OutputMessage"> <wsdl:part name="parameters" element="tns:SayHelloResponse"/> </wsdl:message> - <wsdl:portType name="IService1"> - <wsdl:operation name="SayHello"> <wsdl:input wsaw:Action="http://tempuri.org/IService1/SayHello" message="tns:IService1_SayHello_InputMessage"/> <wsdl:output wsaw:Action="http://tempuri.org/IService1/SayHelloResponse" message="tns:IService1_SayHello_OutputMessage"/> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="BasicHttpBinding_IService1" type="tns:IService1"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/> - <wsdl:operation name="SayHello"> <soap:operation soapAction="http://tempuri.org/IService1/SayHello" 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="Service1"> - <wsdl:port name="BasicHttpBinding_IService1" binding="tns:BasicHttpBinding_IService1"> <soap:address location="http://para-bj.para.local:8080/HelloWCF/Service1.svc"/> </wsdl:port> </wsdl:service> </wsdl:definitions> It uses in tag and the asmx uses in tag what's the difference? Thanks. -Qing

    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

  • 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

  • Unauthorized Sharepoint WSDL from Coldfusion 8

    - by antony.trupe
    How do I solve the error: Unable to read WSDL from URL: https://workflowtest.site.edu/_vti_bin/Lists.asmx?WSDL. Error: 401 Unauthorized. I can successfully view the WSDL from the browser using the same user account. I'm not sure which authentication is being used (Basic or Integrated). How would I find that out? The code making the call is: <cfinvoke username="username" password="password" webservice="https://workflowtest.liberty.edu/_vti_bin/Lists.asmx?WSDL" method="GetList" listName="{CB02EB71-392E-4906-B512-8EC002F72436}" > The impression I get is that coldfusion doesn't like being made to authenticate to get the WSDL. Full stack trace: coldfusion.xml.rpc.XmlRpcServiceImpl$CantFindWSDLException: Unable to read WSDL from URL: https://workflowtest.liberty.edu/_vti_bin/Lists.asmx?WSDL. at coldfusion.xml.rpc.XmlRpcServiceImpl.retrieveWSDL(XmlRpcServiceImpl.java:709) at coldfusion.xml.rpc.XmlRpcServiceImpl.access$000(XmlRpcServiceImpl.java:53) at coldfusion.xml.rpc.XmlRpcServiceImpl$1.run(XmlRpcServiceImpl.java:239) at java.security.AccessController.doPrivileged(Native Method) at coldfusion.xml.rpc.XmlRpcServiceImpl.registerWebService(XmlRpcServiceImpl.java:232) at coldfusion.xml.rpc.XmlRpcServiceImpl.getWebService(XmlRpcServiceImpl.java:496) at coldfusion.xml.rpc.XmlRpcServiceImpl.getWebServiceProxy(XmlRpcServiceImpl.java:450) at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:413) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2662) at cftonytest2ecfm1787185330.runPage(/var/www/webroot/tonytest.cfm:16) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.CfmServlet.service(CfmServlet.java:175) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    Read the article

  • Consuming an RPC/encoded Web Service in .NET

    - by Timmy O' Tool
    I'm trying to build the proxy class for a web service using the wsdl Executing this command: wsdl [http://WSDL_URL] I'm getting Warning: This web reference does not conform to WS-I Basic Profile v1.1. R2706: A wsdl:binding in a DESCRIPTION MUST use the value of "literal" for the use attribute in all soapbind:body, soapbind:fault, soapbind:header and soapbind:headerfault elements. ... Error: Cannot find definition for http://schemas.xmlsoap.org/wsdl/:BouBinding. Service Description with namespace http://schemas.xmlsoap.org/wsdl/ is missing. Parameter name: name The author of the web service told me that the SOAP protocol is RPC/encoded. Is there is any way to generate a proxy class for this?

    Read the article

  • web service with no input parameter

    - by cateof
    I have a WSDL with various portTypes. Some of the contain only output <operation name="getServerTimeZone"> <output message="s0:getServerTimeZoneSoapOut"/> </operation> I would expect that the correct should be: <operation name="getServerTimeZone"> <input message="s0:getServerTimeZoneSoapIn"/> <output message="s0:getServerTimeZoneSoapOut"/> </operation> The problem is that when I am trying to create stubs from the WSDL using gsoap wsdl2h parser I got the following error: No wsdl:definitions/portType/operation/input I haven't tested with other tools (ie WSDL2Java). My question: Is it valid to have a portType with no input? I am using AltovaXML Spy and this WSDL passes the validation.... Is there any meaning having WSDL operation with no input? (I am not talking about One-Way Message Passing, where you can have input but no output - this is valid).

    Read the article

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