Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java client to MS CRM 3.0 webservice via SOAP : empty credentials received

551376Dec 14 2006 — edited Jan 9 2007
Hi,I've been trying to connect to a webservice hosted on a MS platform where IIS runs on and CRM.Based on the WSDL file the project has been built up using a proxy to get it done.
a source file is generated by Oracle tools ( is a utility client for invoking the operations of the Web service port).
When the client runs there is the following happening :
The HTTP analyzer shows a HTTP 402.2 error for each occasion.
When monitoring the IIS (using AuthDiag) I found the following :

<AuthMonRow Number="28" tid="0xbd0" Date="12/14/2006 09:31:04.236"
Name="AcceptSecurityContext" Result="0x80090308" ContextAttr="0x0"
Package="" UserName=""
ClientName=""
ServerName=""
time_taken="0 ms" />
The fields are empty?
Take a look a the code below where you see the fields are fields in though..
Also the testclasses (which I have let JDevloper automaticcaly make) have been resulting to the same effect.
Thanks for any help you could input.

public class CrmServiceSoapClient {
private connectappl.proxy.CrmServiceSoap _port;

public CrmServiceSoapClient() throws Exception {
ServiceFactory factory = ServiceFactory.newInstance();
_port = ((connectappl.proxy.CrmService)factory.loadService(connectappl.proxy.CrmService.class)).getCrmServiceSoap();
}

/**
* @param args
*/
public static void main(String[] args) {
try {
connectappl.proxy.CrmServiceSoapClient myPort = new connectappl.proxy.CrmServiceSoapClient();
System.out.println("calling " + myPort.getEndpoint());
// Add your own code here
myPort.setPassword("passwordvalue");
myPort.setUsername("usernamevalue");

connectappl.proxy.types.com.microsoft.schemas.crm._2006.coretypes.CallerId callerId = new connectappl.proxy.types.com.microsoft.schemas.crm._2006.coretypes.CallerId();
callerId.setCallerGuid("caller ID string");
connectappl.proxy.types.com.microsoft.schemas.crm._2006.query.QueryBase query = new connectappl.proxy.types.com.microsoft.schemas.crm._2006.query.QueryBase();
ColumnSetBase csb = new ColumnSetBase();

query.setEntityName("usersettings");
query.setColumnSet(csb);

BusinessEntityCollection bec = myPort.retrieveMultiple(query,callerId); //RMIException here
BusinessEntity[] be = bec.getBusinessEntities();
int l = be.length;

} catch (Exception ex) {
ex.printStackTrace();
}
}

/**
* delegate all operations to the underlying implementation class.
*/

/**
Executes business logic and special operations using a message-based approach.
The Execute method takes a message request class as a parameter and returns a message response class.

**/
public Response execute(Request request,
connectappl.proxy.types.com.microsoft.schemas.crm._2006.coretypes.CallerId callerId) throws java.rmi.RemoteException
{
return _port.execute(request, callerId);
}

/**
Executes a query specified in the FetchXML language. The results are returned as an XML string.

**/
public String fetch(String fetchXml, connectappl.proxy.types.com.microsoft.schemas.crm._2006.coretypes.CallerId callerId) throws java.rmi.RemoteException {
return _port.fetch(fetchXml, callerId);
}

/**
Creates an instance of an entity.

**/
public String create(BusinessEntity entity, connectappl.proxy.types.com.microsoft.schemas.crm._2006.coretypes.CallerId callerId) throws java.rmi.RemoteException {
return _port.create(entity, callerId);
}

/**
Retrieves a collection of entity instances of the specified type, which meet the specified conditions.

**/
public BusinessEntityCollection retrieveMultiple(connectappl.proxy.types.com.microsoft.schemas.crm._2006.query.QueryBase query, connectappl.proxy.types.com.microsoft.schemas.crm._2006.coretypes.CallerId callerId) throws java.rmi.RemoteException {
return _port.retrieveMultiple(query, callerId);
}

/**
Updates the instance of the specified entity.

**/
public void update(BusinessEntity entity, connectappl.proxy.types.com.microsoft.schemas.crm._2006.coretypes.CallerId callerId) throws java.rmi.RemoteException {
_port.update(entity, callerId);
}


/**
* used to access the JAX-RPC level APIs
* returns the interface of the port instance
*/
public connectappl.proxy.CrmServiceSoap getPort() {
return _port;
}

public String getEndpoint() {
return (String) ((Stub) port).getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY);
}

public void setEndpoint(String endpoint) {
((Stub) port).setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, endpoint);
}

public String getPassword() {
return (String) ((Stub) port).getProperty(Stub.PASSWORD_PROPERTY);
}

public void setPassword(String password) {
((Stub) port).setProperty(Stub.PASSWORD_PROPERTY, password);
}

public String getUsername() {
return (String) ((Stub) port).getProperty(Stub.USERNAME_PROPERTY);
}

public void setUsername(String username) {
((Stub) port).setProperty(Stub.USERNAME_PROPERTY, username);
}

public void setMaintainSession(boolean maintainSession) {
((Stub) port).setProperty(Stub.SESSION_MAINTAIN_PROPERTY, Boolean.valueOf(maintainSession));
}

public boolean getMaintainSession() {
return ((Boolean) ((Stub) port).getProperty(Stub.SESSION_MAINTAIN_PROPERTY)).booleanValue();
}

/**
* returns the transport context
*/
public ClientTransport getClientTransport() {
return ((OracleStub) _port).getClientTransport();
}

}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2007
Added on Dec 14 2006
3 comments
1,464 views