on 12-10-2009 5:44 PM
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 !
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.