issues accessing web services in matlab using createClassFromWsdl

4 visualizzazioni (ultimi 30 giorni)
when we try to access a wcf/.net service we get this error:
Retrieving document at 'http://129.1.21.208:8050/GiBridge?wsdl'.
??? Error using ==> createClassFromWsdl>parseWsdl at 83
javax.wsdl.WSDLException (at /wsdl:definitions/wsdl:import): faultCode=Other_ERROR: Unable to resolve imported document at 'http://localhost:8050/GiBridge?wsdl=wsdl0', relabive to 'http://129.1.21.208:8050/GiBridge?wsdl': java.net.ConnectException: Connection refused: connect
Error in ==> createClassFromWsdl at 32
[R, schema] = parseWsdl(wsdlUrl);
Error in ==> WebServices at 3
createClassFromWsdl('http://129.1.21.208:8050/GiBridge?wsdl')
Retrieving document at 'http://129.1.21.208:8050/GiBridge?wsdl'.
now i get a different issue when i try to do this against a JAX-WS service in glassfish:
Retrieving document at 'http://129.1.21.208:8080/LogImplService/LogImpl?wsdl'.
Retrieving schema at 'http://129.1.21.208:8080/LogImplService/LogImpl?xsd=1', relabive to 'http://129.1.21.208:8080/LogImpleService/LogImpl?wsdl'.
??? Attempt to reference field of non-structure array.
Error in ==> createClassFromWsdl at 45
name = {R.name};
Error in ==> WebServices at 1
createClassFromWsdl('http://129.1.21.208:8080/LogImplService/LogImpl?wsdl')
any ideas?
  1 Commento
James Chan
James Chan il 3 Nov 2011
Now for the java webservice we've traced some of the code to line 149 of createClassFromWsdl which is:
145 extension = bindingOperation.getExtensibilityElements.elementAt(0);
146 if isa(extension, 'javax.wsdl.extensions.soap.SOAPOperatoin')
147 soapOperation = extension;
148 else
149 % Not a SOAP operation. Skip.
150 continue
151 end
152 op = makeOperation(operation, schema);
153 soapBody = bindingOperation.getBindingInput.getExtensibilityElements.elementAt(0);
Now the value of extension is:
K>>
Extension =
UnknownExtensibiiltyElement ({http://www.w3.org/ns/ws-policy}PolicyReference):
Required=null
Element=[wsp:PolicyReference: null]
K>>
Here is the glassfish generated wsdl:
<definitions
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://www.w3.org/ns/ws-policy"
xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://log.ws.lh/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://log.ws.lh/"
name="LogImplService">
<wsp:Policy xmlns:wsat=http://schemas.xmlsoap.org/ws/2004/10/wsat"
wsu:Id=LogImplPortBinding_error_WSAT_Poility">
<wsat:ATAlwaysCapability />
<wsat:ATAssertion
xmlns:ns1="http://schemas.smlsoap.org/ws/2002/12/policy"
wsp:optional=true" ns1:Optional="true" /> </wsp:Policy>
<!-- a bunch more policy elements, one for each method-->
<types>
<xsd:schema>
<xsd:import namespace="http://log.ws.lh/"
schemaLocation="http://localhost:8080:8080/LogImplService/LogImpl?xsd=1" />
</xsd:schema>
</types>
<!-- bunch of message type definitions... -->
<portType name="logImpl">
<operation name=debug">
<input wsam:Action="http://log.ws.lh/logImpl/debugRequest"
message="tns:debug" />
<output wsam:Action="http://log.ws.lh/LogImpl/debugResponse"
message="tns:debugResponse" />
</operation>
<!-- more operaitons elements for each method-->
</portType>
<binding name=LogImplPortBinding" type="tns:LogImpl">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http:
stype="document" />
<operation name="debug">
<wsp:PolicyReference URI="#LogImplPortBinding_debug_WSAT_Policy" />
<soap:operation SoapAction=""/>
<input>
<wsp:PolicyReference URI="#LogImplPortBinding_debug_WSAT_Policy" />
<soap:body use="literal" />
</input>
<output>
<wsp:PolicyReference URI="#LogImplPortBinding_debug_WSAT_Policy" />
<soap:body use="literal" />
</output>
</operation>
<!-- more operations one for each method-->
</binding>
<service name="LogImplService">
<port name="LogImplPort" binding="tns:LogImplPortBinding">
<soap:address location="http://localhost:8080/LogImplService/LogImpl" />
</port>
</service>
</definitions>

Accedi per commentare.

Risposte (1)

Walter Roberson
Walter Roberson il 2 Nov 2011
I speculate that in the second case, if you were to put a breakpoint at createClassFromWsdl line 45, that you would find that R is not a structure at that point and is instead (most likely) an error message, or perhaps an empty array, reflective of a failure earlier.
The first case appears to be using the local host as a proxy... I wonder if the second case does the same?
Time for some "dbstop if error" and kin...
  3 Commenti
Walter Roberson
Walter Roberson il 3 Nov 2011
In the first situation, you have shown the value of the extension variable, but could you show us class(extension) ?
Armand Chrystel Moutchiho
Armand Chrystel Moutchiho il 18 Feb 2013
Modificato: Armand Chrystel Moutchiho il 18 Feb 2013
Hello, Please Walter, I am having exactly the errror you described as second case behaviour! (R is not a structure but is empty). I am trying to use the following wsdl http://almdemo.polarion.com/polarion/ws/services/TrackerWebService?wsdl could you tell me what is wrong at that point, or how you knew that migt happen??
It would be a big help!
Thanks!
Chrys

Accedi per commentare.

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by