facebook

Unable to Generate Client when WSDL uses base64Binary param

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #262540 Reply

    I have built a web service use .NET 2.0.

    One of my methods calls for uploading an image, I chose to use an input parameter of type “byte[]” which ends up looking like “base64Binary” when exposed in the WSDL.

    MyEclipse v5.1GA dies rapidly when it tries to create a client using this.

    Here is my endpoint WSDL: http://services.mtatm.com/soap/api.asmx?WSDL

    Any thoughts?

    #262562 Reply

    support-jed
    Keymaster

    Can you give us a little more info on what dies? Are there exceptions in your .log file?

    #262564 Reply

    I right clicked the installation directory and searched for *.log and found only install log files. Nothing that looked like an exception log or anything. Is there a logging value I need to set to be able to get the log?

    The error is super simple to repro. Just create a new Java project, create a new webservice client, point it to the URL above, set your options and go – Bang!

    The error message is very terse and give you no clue as to exactly what happened. The way I was able to determine what was going on was I did a binary search (hack off half the functions at a time based on success/failure) The end culprit is UploadPicture method (http://services.mtatm.com/soap/api.asmx?op=UploadPicture)

    My only other option for uploading images was to force the client to use String but that is not correct as it really is byte[]. The option that is most correct is to use DIME but that is not widely supported so this is really my only option unless I want to break ‘correctness’

    Beside, every other Client proxy generator I have used works, even PocketSOAP for VB6.

    Thanks a ton! Christian

    #262565 Reply

    Here is the log contents 🙂

    
     !SESSION 2006-11-24 10:23:18.930 -----------------------------------------------
    eclipse.buildId=M20060921-0945
    java.version=1.5.0_08
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_CA
    Command-line arguments:  -os win32 -ws win32 -arch x86
    
    !ENTRY com.genuitec.eclipse.ws.xfire 4 0 2006-11-24 10:24:53.287
    !MESSAGE Error generating services
    !STACK 0
    org.codehaus.xfire.gen.GenerationException: Error generating JAXB model.
        at org.codehaus.xfire.gen.jaxb.JAXBSchemaSupport.initialize(JAXBSchemaSupport.java:108)
        at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:119)
        at com.genuitec.eclipse.ws.xfire.generator.WSGenJob.run(WSGenJob.java:92)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
    
    #262639 Reply

    Any progress?

    #262642 Reply

    zlyon
    Member

    I have the same error. Using this WSDL: http://loc2.openwave.com:8080/locationstudio/webservices/aai.wsdl

    I get the same error:
    “!ENTRY com.genuitec.eclipse.ws.xfire 4 0 2006-11-27 14:02:39.265
    !MESSAGE Error generating services
    !STACK 0
    org.codehaus.xfire.gen.GenerationException: Error generating JAXB model.
    at org.codehaus.xfire.gen.jaxb.JAXBSchemaSupport.initialize(JAXBSchemaSupport.java:108)
    at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:119)
    at com.genuitec.eclipse.ws.xfire.generator.WSGenJob.run(WSGenJob.java:92)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)”

    #262648 Reply

    zlyon
    Member

    I think I answered my own question. RPC encoding is not supported by X-Fire, and I just noticed that my WSDL is all RPC. D’oh.

    @zlyon wrote:

    I have the same error. Using this WSDL: http://loc2.openwave.com:8080/locationstudio/webservices/aai.wsdl

    I get the same error:
    “!ENTRY com.genuitec.eclipse.ws.xfire 4 0 2006-11-27 14:02:39.265
    !MESSAGE Error generating services
    !STACK 0
    org.codehaus.xfire.gen.GenerationException: Error generating JAXB model.
    at org.codehaus.xfire.gen.jaxb.JAXBSchemaSupport.initialize(JAXBSchemaSupport.java:108)
    at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:119)
    at com.genuitec.eclipse.ws.xfire.generator.WSGenJob.run(WSGenJob.java:92)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)”

    #262789 Reply

    Brian Fernandes
    Moderator

    Cjensen,

    I apologize for the delayed response. The generator we use comes right out of XFire and we are actively working with them to improve the error reporting.

    I checked internally and noticed that the generator is failing since you’ve actually used the soapenc:Array type in your WSDL. This most likely does not satisfy the WS-I Basic Profile compliance required by XFire, could you correct that and try again?

    #262842 Reply

    Thanks for the response. I am very certain that the error is not because of the Array. It is definately because of the base64Binary type. If I change the type from “byte[]” to “string” in .NET, the parser works just great. The issue is that I am not at liberty to change this externally facing API due to existing clients of this service.

    The error is most definately from the base64Binary type guaranteed.

    I love your product and understand that there are issues in the first release of a feature. I will do whatever you need to make this better.

    If you can tell me how to incorporate XFire 1.2.3 into MyEclipse I could give that a shot as well.

    Thanks!
    Christian

    #265851 Reply

    asdf999
    Member

    Sollution?!

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Unable to Generate Client when WSDL uses base64Binary param

You must be logged in to post in the forum log in