You need to sign in to do that
Don't have an account?
stephen_m_wood
GetInfoResult licenseType error
Hi guys,
For some reason I'm getting a
I'm using Axis 1.4, I've regenerated the Partner WSDL code using WSDL2Java and I'm logging in as follows:
try
{
binding = (SoapBindingStub)new SforceServiceLocator().getSoap();
}
catch (ServiceException ex1)
{
System.out.println(ex1.getMessage());
ex1.printStackTrace();
return null;
}
try
{
binding = (SoapBindingStub)new SforceServiceLocator().getSoap(new URL(url));
binding._setProperty(SoapBindingStub.ENDPOINT_ADDRESS_PROPERTY, url);
}
catch (MalformedURLException ex)
{
System.out.println(ex.getMessage() + "\n\n");
ex.printStackTrace();
return null;
}
catch (ServiceException ex)
{
System.out.println(ex.getMessage() + "\n\n");
ex.printStackTrace();
return null;
}
//create a session head object
SessionHeader sh = new SessionHeader();
sh.setSessionId(sessionID);
MruHeader mru = new MruHeader();
mru.setUpdateMru(true);
binding.setHeader("urn:enterprise.soap.sforce.com", "MruHeader", mru);
binding.setHeader("SforceService", "SessionHeader", sh);
try
{
userInfo = binding.getUserInfo();
}
catch (Exception e)
{
e.printStackTrace();
}
return userInfo;
It used to work, so not sure what's happened.
Any help is greatly appreciated.
Cheers,
Steve
For some reason I'm getting a
Invalid element in com.sforce.soap.partner.GetUserInfoResult - licenseType
stack trace:
INFO | jvm 1 | 2007/08/30 12:55:10 | org.xml.sax.SAXException: Invalid element in com.sforce.soap.partner.GetUserInfoResult - licenseTypeWhen I try to login to salesforce through the API.
INFO | jvm 1 | 2007/08/30 12:55:10 | at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
INFO | jvm 1 | 2007/08/30 12:55:10 | at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
INFO | jvm 1 | 2007/08/30 12:55:10 | at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
INFO | jvm 1 | 2007/08/30 12:55:10 | at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
INFO | jvm 1 | 2007/08/30 12:55:10 | at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
INFO | jvm 1 | 2007/08/30 12:55:10 | at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
INFO | jvm 1 | 2007/08/30 12:55:10 | at org.apache.axis.client.Call.invoke(Call.java:2467)
INFO | jvm 1 | 2007/08/30 12:55:10 | at org.apache.axis.client.Call.invoke(Call.java:2366)
INFO | jvm 1 | 2007/08/30 12:55:10 | at org.apache.axis.client.Call.invoke(Call.java:1812)
INFO | jvm 1 | 2007/08/30 12:55:10 | at com.sforce.soap.partner.SoapBindingStub.getUserInfo(SoapBindingStub.java:3143)
I'm using Axis 1.4, I've regenerated the Partner WSDL code using WSDL2Java and I'm logging in as follows:
try
{
binding = (SoapBindingStub)new SforceServiceLocator().getSoap();
}
catch (ServiceException ex1)
{
System.out.println(ex1.getMessage());
ex1.printStackTrace();
return null;
}
try
{
binding = (SoapBindingStub)new SforceServiceLocator().getSoap(new URL(url));
binding._setProperty(SoapBindingStub.ENDPOINT_ADDRESS_PROPERTY, url);
}
catch (MalformedURLException ex)
{
System.out.println(ex.getMessage() + "\n\n");
ex.printStackTrace();
return null;
}
catch (ServiceException ex)
{
System.out.println(ex.getMessage() + "\n\n");
ex.printStackTrace();
return null;
}
//create a session head object
SessionHeader sh = new SessionHeader();
sh.setSessionId(sessionID);
MruHeader mru = new MruHeader();
mru.setUpdateMru(true);
binding.setHeader("urn:enterprise.soap.sforce.com", "MruHeader", mru);
binding.setHeader("SforceService", "SessionHeader", sh);
try
{
userInfo = binding.getUserInfo();
}
catch (Exception e)
{
e.printStackTrace();
}
return userInfo;
It used to work, so not sure what's happened.
Any help is greatly appreciated.
Cheers,
Steve
I'm not really sure where to go with this. I can't change the WSDL or the response and I think this is pretty standard code for accessing the service.
Cheers,
Steve
then regenerated using v10 (trying to sort this error). So the question is: How do I generate using v8 partner WSDL?
Not sure how I can get the WSDL basically? Also, why is the outbound message specifying v8?
Thanks for the help.
Cheers,
Steve
However, this leaves us a bit stuffed!
From the documentation, the v8 WSDL is no longer available.
So my question is: salesforce is transmitting using v8 and receiveing using v10, but v10 is not compatible
with v8 - therefore not allowing us to share session state with salesforce!
Housten, we have a BIG BIG problem.
Am I wrong or what?
Steve
Hi,
we are facing the same issue,
when we create partner jar from the command
java -classpath wsc-23.jar com.sforce.ws.tools.wsdlc partner.wsdl.xml partner.jar
we dont get SforceServiceLocator, GetUserInfoResult, SoapBindingStub & SessionHeader in the jar and when we downloaded partner.jar from internet we got the reqruied classes but there we get the same error.
we are new to Salesforce platform can you please expalin the steps mentioned.
Thanks in advance