Hey there,

Sorry for bringing up an old thread.  But, I am working through the
same issue right now.  Is the standing solution to grab the WSDL and
scrape out:

xsi:type="tns3:tBody"
xsi:type="tns3:tAddress"


from the generated WSDL so that Visual Studio can import it?

Is a more elegant solution possible?


Thanks,

Mike



On Feb 21, 9:05 am, [EMAIL PROTECTED] wrote:
> On 16 Feb, 19:02, "geoff w" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Sorry - as a follow-up when I relaxed the code so that the 'substring'
> > exception wouldn't get thrown Axis2->PHP/SCA worked.
>
> > On Feb 16, 1:11 pm, "geoff w" <[EMAIL PROTECTED]> wrote:
>
> > > Ok - I gave Axis2 1.1.1 a whirl. I used the latest Axis2 Eclipse plug-
> > > in to generate the code and I got an error. On the following line of
> > > code with the 'substring' I get a
> > > 'java.lang.StringIndexOutOfBoundsException'. It appears that this is a
> > > breakdown in the generated code because the next line of code seems to
> > > be okay with the idea nsPrefix could be null.
>
> > >                 if (reader.getAttributeValue("http://www.w3.org/2001/
> > > XMLSchema-instance","type")!=null){
> > >                   java.lang.String fullTypeName =
> > > reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance";,
> > >                         "type");
> > >                   if (fullTypeName!=null){
> > >                     java.lang.String nsPrefix =
> > > fullTypeName.substring(0,fullTypeName.indexOf(":"));
> > >                     nsPrefix = nsPrefix==null?"":nsPrefix;
>
> > > Am I missing something here?
>
> > > On Feb 16, 5:48 am, [EMAIL PROTECTED] wrote:
>
> > > > On 15 Feb, 17:23, "geoff w" <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi Simon,
>
> > > > > I did the test on Microsoft Visual C# 2005 Express Edition. I haven't
> > > > > tried with Axis2 for Java yet - but that is on my todo list.
>
> > > > > Cheers,
> > > > >  - Geoff
>
> > > > > On Feb 15, 5:31 am, [EMAIL PROTECTED] wrote:
>
> > > > > > On 14 Feb, 19:26, "cem" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > On Feb 14, 4:59 pm, "geoff w" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > Can you confirm that this new version of SCA 1.1.2 will fix the 
> > > > > > > > issue
> > > > > > > > with exposing web services to a .NET environment?
>
> > > > > > > > I've downloaded this new version and tried it in Visual C# but I
> > > > > > > > received the following error similar to 1.1.1:
>
> > > > > > > > -- output --
>
> > > > > > > > The document at the 
> > > > > > > > urlhttp://localhost:8080/WebServices/account/SCAtest.php?wsdl
> > > > > > > > was not recognized as a known document type.
> > > > > > > > The error message from each known type may help you fix the 
> > > > > > > > problem:
> > > > > > > > - Report from 'DISCO Document' is 'Discovery document at the 
> > > > > > > > URLhttp://localhost:8080/WebServices/account/SCAtest.php?wsdlcouldnot
> > > > > > > > be found.'.
> > > > > > > >   - The document format is not recognized.
> > > > > > > > - Report from 'WSDL Document' is 'There is an error in XML 
> > > > > > > > document
> > > > > > > > (39, 10).'.
> > > > > > > >   - The specified type was not recognized: name='tBody',
> > > > > > > > namespace='http://schemas.xmlsoap.org/wsdl/soap/', at <body
> > > > > > > > xmlns='http://schemas.xmlsoap.org/wsdl/soap/'>.
> > > > > > > > - Report from 'XML Schema' is 'The root element of a W3C XML 
> > > > > > > > Schema
> > > > > > > > should be <schema> and its namespace should be 
> > > > > > > > 'http://www.w3.org/2001/
> > > > > > > > XMLSchema'.'.
>
> > > > > > > Well I can confirm that you do have "the fix", because it 
> > > > > > > previously
> > > > > > > generated:
>
> > > > > > >   <tns3:body xsi:type="tBody" use="literal"/>
>
> > > > > > > and your error message said that it couldn't find type tBody in 
> > > > > > > the
> > > > > > > wsdl namespace. This was correct, because tBody is not in the soap
> > > > > > > namespace.
>
> > > > > > > Now what's generated is:
>
> > > > > > >   <tns3:body xsi:type="tns3:tBody" use="literal"/>
>
> > > > > > > but it seems that is still not good enough. I don't see why it's
> > > > > > > telling you that it can't find the tBody type in the soap 
> > > > > > > namespace -
> > > > > > > it is present there as a complexType. Can anyone explain?
>
> > > > > > Hi Geoff,
>
> > > > > > I get the same error when I try to add a web reference in Visual
> > > > > >Studio7, 2002. For interest can you say what version of Microsoft
> > > > > > software you are using? I'll have a look at it and see if I can work
> > > > > > out what's wrong now.
>
> > > > > > Regards
>
> > > > > > Simon
>
> > > > OK thanks Geoff, so it's not some point in time Microsoft thing. I'll
> > > > be interested to hear what happens with Axis.
>
> > > > Simon
>
> Hi Geoff, sorry, I missed these posts in my reader in a flurry of
> other stuff. So you are saying, with the exception of the problem with
> the generated code, your Axis->PHP/SCA test worked.  Thanks for that.
> Good news but we still need to sort out some way round the .Net
> problem without having to manually edit the WSDL.
>
> On the generated code problem. It seems that it is trying to find a
> ":" in an xsi:type attribute. I don't see any in the WSDL without a
> namespace prefix but maybe this piece of code has already processed
> them out. Anyhow, as you say It would seem to be coded to handle the
> fact case where there might not be one (which is a good idea :-) so
> I'm not sure what's going  here. If we fix the WSDL for the .Net case
> no doubt this will go away also.
>
> Simon


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"phpsoa" group.
To post to this group, send email to phpsoa@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to