You need to sign in to do that
Don't have an account?
Micky M
Another web service
Hi all, i have this code written in java, ive used java -classpath wsc-23.jar com.sforce.ws.tools.wsdlc MyTestWebMethod.wsdl MyTestWebMethod.jar to create my enterprise and apex class jar and added those to the project. I run this ..
public class QuckSoapTest
{
EnterpriseConnection connection;
ConnectorConfig config = new ConnectorConfig();
String UserName = "soapuser@proact.co.uk.developer";
String Password = "Password12345";
public static void main(String[] args)
{
new QuckSoapTest().go();
}
public void go()
{
try
{
config.setUsername(UserName);
config.setPassword(Password);
connection = Connector.newConnection(config);
System.out.println("Auth Endpoint " + config.getAuthEndpoint());
System.out.println("Service Endpoint " + config.getServiceEndpoint());
com.sforce.soap.MyTestWebMethod.SoapConnection soap = new com.sforce.soap.MyTestWebMethod.SoapConnection(config);
soap.setSessionHeader(config.getSessionId());
System.out.println(soap.MyTestWebMethod());
}
catch (ConnectionException e)
{
e.printStackTrace();
}
}
}
and i get this error :
Auth Endpoint https://test.salesforce.com/services/Soap/c/31.0/0DFM00000004D7r
Service Endpoint https://cs7.salesforce.com/services/Soap/c/31.0/00DM00000009BGt/0DFM00000004D7r
com.sforce.ws.SoapFaultException: No operation available for request {http://soap.sforce.com/schemas/class/MyTestWebMethod}MyTestWebMethod
at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:204)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:148)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:110)
at com.sforce.soap.MyTestWebMethod.SoapConnection.MyTestWebMethod(SoapConnection.java:177)
at quickSoapTest.QuckSoapTest.go(QuckSoapTest.java:34)
at quickSoapTest.QuckSoapTest.main(QuckSoapTest.java:17)
Does anyone have any idea what im doing wrong as im slowly going insane!!! thanks all.
public class QuckSoapTest
{
EnterpriseConnection connection;
ConnectorConfig config = new ConnectorConfig();
String UserName = "soapuser@proact.co.uk.developer";
String Password = "Password12345";
public static void main(String[] args)
{
new QuckSoapTest().go();
}
public void go()
{
try
{
config.setUsername(UserName);
config.setPassword(Password);
connection = Connector.newConnection(config);
System.out.println("Auth Endpoint " + config.getAuthEndpoint());
System.out.println("Service Endpoint " + config.getServiceEndpoint());
com.sforce.soap.MyTestWebMethod.SoapConnection soap = new com.sforce.soap.MyTestWebMethod.SoapConnection(config);
soap.setSessionHeader(config.getSessionId());
System.out.println(soap.MyTestWebMethod());
}
catch (ConnectionException e)
{
e.printStackTrace();
}
}
}
and i get this error :
Auth Endpoint https://test.salesforce.com/services/Soap/c/31.0/0DFM00000004D7r
Service Endpoint https://cs7.salesforce.com/services/Soap/c/31.0/00DM00000009BGt/0DFM00000004D7r
com.sforce.ws.SoapFaultException: No operation available for request {http://soap.sforce.com/schemas/class/MyTestWebMethod}MyTestWebMethod
at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:204)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:148)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:110)
at com.sforce.soap.MyTestWebMethod.SoapConnection.MyTestWebMethod(SoapConnection.java:177)
at quickSoapTest.QuckSoapTest.go(QuckSoapTest.java:34)
at quickSoapTest.QuckSoapTest.main(QuckSoapTest.java:17)
Does anyone have any idea what im doing wrong as im slowly going insane!!! thanks all.
Service Endpoint should be: https://cs7.salesforce.com/services/Soap/s/31.0/00DM00000009BGt/0DFM00000004D7r
You can use following code to replace:
config.setUsername(UserName);
config.setPassword(Password);
connection = Connector.newConnection(config);
System.out.println("Auth Endpoint " + config.getAuthEndpoint());
System.out.println("Service Endpoint " + config.getServiceEndpoint());
String serviceUrl =config.getServiceEndpoint().replace("/Soap/c/", "/Soap/s/");
config.setServiceEndpoint(serviceUrl);
System.out.println("Service Endpoint After Change" + config.getServiceEndpoint());
com.sforce.soap.MyTestWebMethod.SoapConnection soap = new com.sforce.soap.MyTestWebMethod.SoapConnection(config);
soap.setSessionHeader(config.getSessionId());
System.out.println(soap.MyTestWebMethod());
and the service endpoint is now : https://cs7.salesforce.com/services/Soap/s/31.0/00DM00000009BGt/0DFM00000004D7r
am i doing this is the right place as im still getting:
com.sforce.ws.SoapFaultException: No operation available for request {http://soap.sforce.com/schemas/class/MyTestWebMethod}MyTestWebMethod
at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:204)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:148)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:110)
at com.sforce.soap.MyTestWebMethod.SoapConnection.MyTestWebMethod(SoapConnection.java:177)
at quickSoapTest.QuckSoapTest.go(QuckSoapTest.java:44)
at quickSoapTest.QuckSoapTest.main(QuckSoapTest.java:23)
Thanks
Thanks for your help!!