cancel
Showing results for 
Search instead for 
Did you mean: 

wsdl endpoint problem

Former Member
0 Kudos

Hi everyone, i need some help, I have a wsdl that points to an external server, if I test the wsdl in WSNavigator I need to chance the end point to "Defined by the user" and set the ip of the external server because by default is "localhost" there, my problem is that when my app execute the model, it tries to reach localhost not the ip given when the wsdl was imported. My question is how i need to import the wsdl to my app to be available to change the endpoint.

Thanks !

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Friend,

Have you created the Logical Destination. if you have Not then create the logical destination and there you can change the ip. and in your application use the same logical destination for the model.

Let me know if any problem you face.

Regards

Jeetendra

Answers (2)

Answers (2)

former_member312910
Participant
0 Kudos

Hi

This is how you change the endpoint dynamically in code.

wdContext.<modelNode>().bind(<modelobject>);

<model object>.wdSetInvocationModifier(new IWDWSInvocationModifier() {

public void doModifyInvocation(final Object port) {

if ( port instanceof Stub ) {

final Stub stub = (Stub)port;

stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,<endpoint>);

} else if (port instanceof DInterfaceInvoker) {

final DInterfaceInvoker invoker = (DInterfaceInvoker)port;

invoker.setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, <endpoint>);

} else{

throw new RuntimeException(<Error Message>);

}

}

public void doModifyAfterInvocation() {}

}

);

<modelobject>.execute();

Hope this solves your problem.

cheers

Deepu

Former Member
0 Kudos

Hi Isaac

If you have chance to connect to the server you can define host. For example;

192.168.1.1 testserver

And you can use testserver in code for destination. When you carry your code to production you define same host entryon the server. You dont need to change any code.