.NET integration and SCA_SDO 1.1.2

조회수 4회
읽지 않은 첫 메시지로 건너뛰기

geoff w

읽지 않음,
2007. 2. 14. 오전 11:59:2107. 2. 14.
받는사람 phpsoa
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 url http://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 URL
http://localhost:8080/WebServices/account/SCAtest.php?wsdl could not
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'.'.

-- source --

<?php
include_once ('app_loader.inc.php');
include_once ('SCA/SCA.php');

/**
* Scaffold implementation for a remote StockQuote Web service.
*
* @service
* @binding.ws
*
*/
class SCAtest {

/**
* Get a stock quote for a given ticker symbol.
*
* @param string $ticker The ticker symbol.
* @return float The stock quote.
*/
function getQuote($ticker) {
return 80.9;
}
}
?>

-- wsdl --

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns2="http://SCAtest" xmlns:tns="http://schemas.xmlsoap.org/
wsdl/" xmlns:tns3="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
targetNamespace="http://SCAtest">
<types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://SCAtest"
elementFormDefault="qualified">
<xs:element name="getQuote">
<xs:complexType>
<xs:sequence>
<xs:element name="ticker" type="xs:string" nillable="true"/
>
</xs:sequence>
</xs:complexType>

</xs:element>
<xs:element name="getQuoteResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="getQuoteReturn" type="xs:float"
nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

</types>

<message name="getQuoteRequest">
<part name="getQuoteRequest" element="tns2:getQuote"/>
</message>
<message name="getQuoteResponse">
<part name="return" element="tns2:getQuoteResponse"/>
</message>
<portType name="SCAtestPortType">

<operation name="getQuote">
<input message="tns2:getQuoteRequest"/>
<output message="tns2:getQuoteResponse"/>
</operation>
</portType>
<binding name="SCAtestBinding" type="tns2:SCAtestPortType">
<operation name="getQuote">
<input>
<tns3:body xsi:type="tns3:tBody" use="literal"/>

</input>
<output>
<tns3:body xsi:type="tns3:tBody" use="literal"/>
</output>
<tns3:operation xsi:type="tns3:tOperation" soapAction=""/>
</operation>
<tns3:binding xsi:type="tns3:tBinding" transport="http://
schemas.xmlsoap.org/soap/http" style="document"/>
</binding>
<service name="SCAtestService">

<port name="SCAtestPort" binding="tns2:SCAtestBinding">
<tns3:address xsi:type="tns3:tAddress" location="http://
localhost:8080/WebServices/account/SCAtest.php"/>
</port>
</service>
</definitions>

<!-- this line identifies this file as WSDL generated by SCA for PHP.
Do not remove -->

cem

읽지 않음,
2007. 2. 14. 오후 2:26:2807. 2. 14.
받는사람 phpsoa
On Feb 14, 4:59 pm, "geoff w" <geoff.whitting...@gmail.com> 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?wsdlcould not

> 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?

simon...@googlemail.com

읽지 않음,
2007. 2. 15. 오전 5:31:3107. 2. 15.
받는사람 phpsoa

Hi Geoff,

I get the same error when I try to add a web reference in Visual
Studio 7, 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

simon...@googlemail.com

읽지 않음,
2007. 2. 15. 오전 5:51:2507. 2. 15.
받는사람 phpsoa

OK, so the only way I can get this to work is by removing all of the
xsi:type attributes from the WSDL. This WSDL still works for PHP SCA
by the way. I expect the xsi:type attributes are
generated by SDO because the SOAP exlements in WSDL are generated in
an open type and SDO then thinks it needs to tell us what type they
when it writes out the XML. Is there a flag to turn this behaviour off?

geoff w

읽지 않음,
2007. 2. 15. 오후 12:23:4307. 2. 15.
받는사람 phpsoa
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

simon...@googlemail.com

읽지 않음,
2007. 2. 16. 오전 5:48:5707. 2. 16.
받는사람 phpsoa

OK thanks Geoff, so it's not some point in time Microsoft thing. I'll
be interested to hear what happens with Axis.

Simon

geoff w

읽지 않음,
2007. 2. 16. 오후 1:11:0107. 2. 16.
받는사람 phpsoa
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?

geoff w

읽지 않음,
2007. 2. 16. 오후 2:02:1907. 2. 16.
받는사람 phpsoa
Sorry - as a follow-up when I relaxed the code so that the 'substring'
exception wouldn't get thrown Axis2->PHP/SCA worked.

simon...@googlemail.com

읽지 않음,
2007. 2. 21. 오전 7:05:4907. 2. 21.
받는사람 phpsoa

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

Michael Caplan

읽지 않음,
2007. 5. 10. 오후 4:08:4507. 5. 10.
받는사람 simon...@googlemail.com, php...@googlegroups.com
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

> > > > > >Studio7, 2002. For interest can you say what version of Microsoft

Caplan, Michael

읽지 않음,
2007. 5. 10. 오후 7:48:0207. 5. 10.
받는사람 php...@googlegroups.com
Hey there,


Thanks,

Mike


E-mail messages may contain viruses, worms, or other malicious code. By reading the message and opening any attachments, the recipient accepts full responsibility for taking protective action against such code. Henry Schein is not liable for any loss or damage arising from this message.

The information in this email is confidential and may be legally privileged. It is intended solely for the addressee(s). Access to this e-mail by anyone else is unauthorized.

simon...@googlemail.com

읽지 않음,
2007. 5. 11. 오전 5:26:2107. 5. 11.
받는사람 phpsoa
Hi Mike

It seems that this is still the case. I didn't get a good answer to
whether we can turn the behaviour off so I'll go and take a look at
the code and see if we can request the omission of the type
annotations. It may be that they specified this bhaviour in the SDO
spec but it's probably easier to fix SDO than fix the MS dev tools.

Simon

Caplan, Michael

읽지 않음,
2007. 5. 11. 오전 7:26:5407. 5. 11.
받는사람 php...@googlegroups.com
Hi Simon,

Thanks for the feedback. I logged this as feature request #11012 in
PECL.

Best,

Mike

simon...@googlemail.com

읽지 않음,
2007. 5. 11. 오전 7:31:0007. 5. 11.
받는사람 phpsoa

Thanks for doing that Mike

Simon

전체답장
작성자에게 답글
전달
새 메시지 0개