Fetch WSDL Error: File not found. xsd:import tag in wsdl ..Is this supported in apigee while creating a new proxy through wsdl file?

Not applicable

Hi All,

I am trying to create a new API proxy using wsdl file. This wsdl file is having <xsd:import > tag and it is trying to refer some other xsd in the schemalocation .

<xsd:import namespace="XXX" schemaLocation="../schemas/XXX.xsd" />

Although the file .xsd is available under schemas folder , while creating a new API proxy i'm getting the below error.

Fetch WSDL Error: File not found. XXX.xsd (No such file or directory).

Instead of import statement when i copied the whole xsd in that place , it is working fine.

Just want to know whether apigee supports <xsd:import> or <wsdl:import> tags in wsdl file while generating a new API proxy.

Thanks.

Solved Solved
1 26 10.3K
1 ACCEPTED SOLUTION

Not applicable

@Jayakrishna K R, @arghya das, it should work.

It sounds like you have the .wsdl and .xsd on your local file system, correct? If so, you need to select both files (or all files if more than just the two), not just the .wsdl file, when you click the Choose files button.

View solution in original post

26 REPLIES 26

I don't believe a relative path will work. If you make that schema available on the network and supply a full URL I believe it should work.

Thanks Carlos. But the schema is yet not available on the network , so i couldn't use URL. Have to go with the WSDL file provided. Any inputs on <xsd:Import> tag , whether it is supported or not in apigee when using wsdl file?

> But the schema is yet not available on the network ,

But of course you could just put it on the network somewhere (eg, github.io or some other free hoster), and then... it would work. right? Just for testing purposes I mean...

adas
Participant V

@Jayakrishna K R I am not 100% certain but if I recollect properly, xsd:import is not supported when using wsdl import in Apigee Edge.

@coverbeck can you confirm ?

Not applicable

@Jayakrishna K R, @arghya das, it should work.

It sounds like you have the .wsdl and .xsd on your local file system, correct? If so, you need to select both files (or all files if more than just the two), not just the .wsdl file, when you click the Choose files button.

Oh that's interesting. I didn't know that trick. Does the schemaLocation of the import matter or will we just try to match up based on file name?

I'd never thought about it until you asked, but I think it will only work with a relative location of the same directory. We process the WSDL and XSD files in Java -- they end up in the same temporary directory on our web server, where we then run a WSDL library against them.

Due to security restrictions, the browser will not let us know the full path of the files being uploaded, so I don't think there's any way to preserve the relativity of the paths to each other of the files. Which means that for files, only relative imports in the same directory will work.

@coverbeck

I have chosen all the wsdl file and xsd files from the local system , but its still throwing error when the xsd:import or wsdl:import tags are present in xsd or wsdl respectively.

@Jayakrishna K R, it's buried in in my comment to @Carlos Eberhardt, but we will only support schemaLocations in the same directory if you are using files. I just noticed that your schema is in a sibling directory, ../schemas...., so that won't work.

The reason for this is that we process the WSDL files with Java code, on the web server. When we get the files from your system, we don't know the location of the files relative to each other, so we put them all in the same directory. We can't know the location of the files, because browsers won't give us that information.

You will either need to update your schema location to be in the same directory, or host the WSDL and schema on some server and access them via an url (if you access via an url, then there is no restriction on the location).

@coverbeck : Thanks for the reply. I will definitely try changing the schemalocation to the same directory and check if it is working or else will expose the wsdl on some server and access it via URL.

Hi @coverbeck, I'm trying to deploy an api proxy that has one WSDL and a lot of XSD files with relative paths to each other locally from my computer.
I've changed all the paths to assume they will be in the same folder when uploaded into APIGEE (Version 4.17.09.00 on premise) but still getting the same error when deploying from Maven:

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.6:deploy (deploy-bundle) on project smartnl_um-api: : MojoExecutionException: com.google.api.client.http.HttpResponseException: 400 Bad Request
[ERROR] {
[ERROR] "code" : "steps.messagevalidation.ResourceCompileFailed",
[ERROR] "message" : "MessageValidation MessageValidation.NLUM: Failed to compile resource AGI.in.wsdl. Context Revision:4;APIProxy:smartnl_um-api;Organization:bootssandbox;Environment:dev",
[ERROR] "contexts" : [ ],
[ERROR] "cause" : {
[ERROR] "code" : "messaging.resource.WSDLCompileFailed",
[ERROR] "message" : "Compilation of wsdl resource AGI.in.wsdl failed", [ERROR] "contexts" : [ ],
[ERROR] "cause" : {
[ERROR] "message" : "WSDLException (at /wsdl:definitions/wsdl:types/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'file:/var/tmp/schemaextractor1859657621055234238.dir/actuelemedicatie.message.xsd'.: java.io.FileNotFoundException: /var/tmp/schemaextractor1859657621055234238.dir/actuelemedicatie.message.xsd (No such file or directory)",
[ERROR] "contexts" : [ ],
[ERROR] "cause" : {
[ERROR] "message" : "/var/tmp/schemaextractor1859657621055234238.dir/actuelemedicatie.message.xsd (No such file or directory)",
[ERROR] "contexts" : [ ]
[ERROR] }
[ERROR] }
[ERROR] }
[ERROR] }

I've tried having WSDL and XSD files inside the wsdl folder inside the resources folder and having WSDL in the wsdl folder and XSD in the xsd folder withouth relative paths but still getting the same error message when trying to deploy.

I need the schema files to perform Apigee Message Validation policy in my Proxy.

Not applicable

Hi @Jayakrishna K R , I'm looking at Amazon S3 example supported and it's slightly different. I wonder if you could modify your WSDL to use xsd:include instead of import:

  <wsdl:types>
    <xsd:schema
     elementFormDefault="qualified"
     targetNamespace="http://s3.amazonaws.com/doc/2006-03-01/">
      <xsd:include schemaLocation="AmazonS3.xsd"/>
    </xsd:schema>
  </wsdl:types>

Not applicable

Hi,

Not able to upload WSDL on Apigee Edge 4.16.1. I am not able load my WSDL which is available on network.

"Error fetching WSDL"

I was able to do so with Apigee edge 4.15.7. please advise what can be the reason.

Not applicable
@Pravin

, are you specifying a URL or a file? If it's an URL, is it on a public IP address or an internal IP address?

Hi @coverbeck

I am specifying an url. and it is an internal server name and ip adrress.

3286-uploadwsdl.png

Better you download wsdl file locally and then choose as file rather URL.

Not applicable

Hi @Pravin,

By default, we no longer let you specify an internal IP address. It is done for security purposes.

If you want to do it anyway, you need to set, in the UI's apigee.conf:

	apigee.feature.enableTraceForInternalAddresses="true"

Charles

Thank you @coverbeck

it worked. I had to set following two parameters and restart edge-ui. I guess second one was also required..

conf_apigee-base_apigee.feature.enabletraceforinternaladdresses="true" 
conf_apigee-base_apigee.feature.enablewsdlforinternaladdresses="true"

Oops, you're right; I gave you the wrong setting. Glad you figured it out.

The first one is for when you click on Send Request in Trace.

Thank you ! !

Hi @coverbeck,

I tried to upload a wsdl and I got same error as "Error fetching WSDL". The url soap address in the WDSL is internal to our organization and i am using on-premise apigee edge. I am wondering why we are getting this error. Even the url import is getting same error as @Pravin is getting.

Thanks,

Krish

@krish

1) Did you set the properties as described in Pravin's message from August 3, 2016?

2) Can you curl the WSDL from the same box the UI is located on?

3) Is the url http or https? If it is https and you can curl it, can you curl it without using -k option? I'm asking that because our code will not connect to an https endpoint if there are any certificate issues.

never mind @coverbeck. I found the issue. I haven't imported the xsd with wsdl while importing. It was resolved when I chose xsds with wsdl. Thank you for you reply.

Thanks,

Krishanu


Hi @Krish, I'm still facing issue when importing WSDL with XSD imported inside.
I'm decalring them in the same folder, but getting following error message:

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.6:deploy (deploy-bundle-step) on project loyalty-api: : MojoExecutionException: com.google.api.client.http.HttpResponseException: 400 Bad Request
[ERROR] {
[ERROR]   "code" : "steps.messagevalidation.ResourceCompileFailed",
[ERROR]   "message" : "MessageValidation MessageValidation.Loyalty.RetrieveCustomer: Failed to compile resource LoyaltyCard_V0.1.wsdl. Context Revision:15;APIProxy:loyalty-api;Organization:bootssandbox;Environment:dev",
[ERROR]   "contexts" : [ ],
[ERROR]   "cause" : {
[ERROR]     "code" : "messaging.resource.WSDLCompileFailed",
[ERROR]     "message" : "Compilation of wsdl resource LoyaltyCard_V0.1.wsdl failed",
[ERROR]     "contexts" : [ ],
[ERROR]     "cause" : {
[ERROR]       "message" : "WSDLException (at /wsdl:definitions/wsdl:types/xs:schema): faultCode=PARSER_ERROR: Problem parsing 'file:/var/tmp/schemaextractor8628427049657911904.dir/CommonDataTypes.xsd'.: java.io.FileNotFoundException: /var/tmp/schemaextractor8628427049657911904.dir/CommonDataTypes.xsd (No such file or directory)",
[ERROR]       "contexts" : [ ],
[ERROR]       "cause" : {
[ERROR]         "message" : "/var/tmp/schemaextractor8628427049657911904.dir/CommonDataTypes.xsd (No such file or directory)",
[ERROR]         "contexts" : [ ]
[ERROR]       }
[ERROR]     }
[ERROR]   }
[ERROR] }

Declaration in WSDL:
<xs:import namespace="http://schemas.open.com/loyalty/datatypes/common/v1_0" schemaLocation="./CommonDataTypes.xsd"/>

Resources folder image:

9396-annotation-2019-11-07-123643.png

Please could you help me on importing the WSDL?

No, please do not append a brand new question to a four year old thread. Not a good idea. If you have a new question, post a new question. If you like, , you can cite this old question and answer via a link.