Hi all,
I have used Ribbon Workbench to add a button to the Opportunity ribbon. I have coded the button to get data from the form
e.g var Name = Xrm.Page.getAttribute("name").getValue(). I have then used the variables within a SOAP XML packet.
Please help with the necessary Javascript using the WSDL to send the packet?
N.B I have successfully tested the connection using the WSDL with SoapUI.
Here is most of the WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="schemas.xmlsoap.org/wsdl" xmlns:seblService="http://siebel.com/webservices" xmlns:soap="schemas.xmlsoap.org/.../soap" xmlns:xsdLocal1="www.siebel.com/.../Opportunity" targetNamespace="http://siebel.com/CustomUI" xmlns:soapenc="schemas.xmlsoap.org/.../encoding" xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:tns="http://siebel.com/CustomUI">
<types>
<xsd:schema elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://siebel.com/webservices" xmlns:xsd="www.w3.org/.../XMLSchema">
<xsd:import namespace="http://siebel.com/webservices" />
<xsd:element name="UsernameToken" type="xsd:string" />
<xsd:element name="PasswordText" type="xsd:string" />
<xsd:element name="SessionType" type="xsd:string" />
</xsd:schema>
<xsd:schema elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://siebel.com/CustomUI" xmlns:xsd="www.w3.org/.../XMLSchema">
<xsd:import namespace="www.siebel.com/.../Opportunity"></xsd:import>
<xsd:element name="SyncOpportunity3_Input">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SendConfirmationEmail" type="xsd:string"></xsd:element>
<xsd:element name="UpdateToken" type="xsd:string"></xsd:element>
<xsd:element ref="xsdLocal1:Opportunity"></xsd:element>
<xsd:element name="CallingSystem" type="xsd:string"></xsd:element>
<xsd:element name="KeepLocking" type="xsd:string"></xsd:element>
<xsd:element name="Error_spcCode" type="xsd:string"></xsd:element>
<xsd:element name="EmailAddrOverwrite" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SyncOpportunity3_Output">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Error_spcCode" type="xsd:string"></xsd:element>
<xsd:element ref="xsdLocal1:Opportunity"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<xsd:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xsdLocal1="www.siebel.com/.../Opportunity" targetNamespace="www.siebel.com/.../Opportunity" xmlns:xsd="www.w3.org/.../XMLSchema">
<xsd:annotation>
<xsd:documentation>Copyright (C) 2001-2004 Siebel Systems, Inc. All rights reserved. Siebel XSD Generation</xsd:documentation>
</xsd:annotation>
<xsd:element name="Opportunity" type="xsdLocal1:Opportunity"></xsd:element>
<xsd:complexType name="OpportunityTopElmt">
<xsd:sequence>
<xsd:element name="Opportunity" maxOccurs="1" minOccurs="1" type="xsdLocal1:Opportunity"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Opportunity">
<xsd:sequence>
<xsd:element name="LoanWriterName" maxOccurs="1" minOccurs="0" type="xsd:string"></xsd:element>
...
<message name="SyncOpportunity3_Input">
<part name="SyncOpportunity3_Input" element="tns:SyncOpportunity3_Input"></part>
</message>
<portType name="AFGSyncOpportunityVer3">
<operation name="SyncOpportunity3">
<input message="tns:SyncOpportunity3_Input"></input>
<output message="tns:SyncOpportunity3_Output"></output>
</operation>
</portType>
<binding name="AFGSyncOpportunityVer3" type="tns:AFGSyncOpportunityVer3">
<soap:binding transport="schemas.xmlsoap.org/.../http" style="document"></soap:binding>
<operation name="SyncOpportunity3">
<soap:operation soapAction="document/siebel.com/CustomUI:SyncOpportunity3"></soap:operation>
<input>
<soap:header message="tns:SiebelInputHeaderMessage" part="userName" use="literal" />
<soap:header message="tns:SiebelInputHeaderMessage" part="passWord" use="literal" />
<soap:header message="tns:SiebelInputHeaderMessage" part="SessionType" use="literal" />
<soap:body use="literal"></soap:body>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
</binding>
<service name="AFGOpportunitySyncVersion3">
<port binding="tns:AFGSyncOpportunityVer3" name="AFGSyncOpportunityVer3">
<soap:address location="flexuat.afgonline.com.au/.../start.swe;amp;SWEExtCmd=Execute&WSSOAP=1"></soap:address>
</port>
</service>