Hi,
i was trying the below code to create a WebServiceClient. problem #1 -------------- | builder | builder := WsdlClassBuilder readFrom:myURlPath asURI. builder package: 'MyWebServices'. builder createClientClasses and i get the following error "Can not resolve simple type:DOW...." the origin of the problem (from the stack) was the method WebServices.XMLTypesParser >>refForSimpleType: anElelemnt where anElement:= <xsd:simpleType name="DOW"> <xsd:list> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="None"></xsd:enumeration> <xsd:enumeration value="Monday"></xsd:enumeration> <xsd:enumeration value="Tuesday"></xsd:enumeration> <xsd:enumeration value="Wednesday"></xsd:enumeration> <xsd:enumeration value="Thursday"></xsd:enumeration> <xsd:enumeration value="Friday"></xsd:enumeration> <xsd:enumeration value="WeekDay"></xsd:enumeration> <xsd:enumeration value="Saturday"></xsd:enumeration> <xsd:enumeration value="Sunday"></xsd:enumeration> <xsd:enumeration value="WeekEnd"></xsd:enumeration> <xsd:enumeration value="Daily"></xsd:enumeration> </xsd:restriction> </xsd:simpleType> </xsd:list>. </xsd:simpleType> I found that the element list misses the attribute 'itemType' as per the method. But w3schools specify that the 'list' element should not include the 'itemType' attribute if it has a 'SimpleType' as child element. problem #2 -------------- During the process, at some position i noticed that an infinite loop was set. The reason was, two xsd files are imported from each other and VisualWorks tries to get the xsd files using HTTP:GET method each time it finds an import reference. The actual problem is, we were able to run a sample .NET application which does the same thing(creating a WebService Client) using the same above URL. So the problem can be of VW rather than the oddity in the xsd files which i found. I have checked both above situations in VW 7.5 also and exactly the same result is obtained. problem #3 -------------- Is it possible to create the wsClient from a wsdl which requires a basic authentication to access the URl? I think VW 7.5 gives an option to provide a username and password (in the wsdl wizard) ut it is not added as the baic authentication. Thanks in advance for any suggestions, maNi |
> and i get the following error
the
> "Can not resolve simple type:DOW...." > the origin of the problem (from the stack) was the method > WebServices.XMLTypesParser >>refForSimpleType: anElelemnt > where anElement:= > <xsd:simpleType name="DOW"> > <xsd:list> > <xsd:simpleType> > <xsd:restriction base="xsd:string"> > <xsd:enumeration value="None"></xsd:enumeration> > <xsd:enumeration value="Monday"></xsd:enumeration> > <xsd:enumeration value="Tuesday"></xsd:enumeration> > <xsd:enumeration value="Wednesday"></xsd:enumeration> > <xsd:enumeration value="Thursday"></xsd:enumeration> > <xsd:enumeration value="Friday"></xsd:enumeration> > <xsd:enumeration value="WeekDay"></xsd:enumeration> > <xsd:enumeration value="Saturday"></xsd:enumeration> > <xsd:enumeration value="Sunday"></xsd:enumeration> > <xsd:enumeration value="WeekEnd"></xsd:enumeration> > <xsd:enumeration value="Daily"></xsd:enumeration> > </xsd:restriction> > </xsd:simpleType> > </xsd:list>. > </xsd:simpleType> > > I found that the element list misses the attribute 'itemType' as per > method. > But w3schools specify that the 'list' element should not include the > 'itemType' attribute if it has a 'SimpleType' as child element. Currently the XML <list> variety is not fully supported. In this case we need to map this simple type ("DOW") to <sequence_of> with the item type as a string. I would suggest submitting this case to our support. It will help to set priority for the case and allocate time to add correct mapping for the XML list type. Temporarily if it's possible change this part of the schema as <xsd:simpleType name="DOW"> <xsd:restriction base="xsd:string"/> </xsd:simpleType> The XML will be unmarshaled as a string. For example: "Monday Wednesday Saturday". > > problem #2 > -------------- > > During the process, at some position i noticed that an infinite loop was > set. > The reason was, two xsd files are imported from each other and > VisualWorks tries to get the xsd files using HTTP:GET method each time > it finds an import reference. > The actual problem is, we were able to run a sample .NET application > which does the same thing(creating a WebService Client) using the same > above URL. So the problem can be of VW rather than the oddity in the xsd > files which i found. We tried to handle import cross-references in 7.4/7.5. It could be not covered case. Please, open the support case and provide the wsdl schema. > > > I have checked both above situations in VW 7.5 also and exactly the same > result is obtained. > > problem #3 > -------------- > Is it possible to create the wsClient from a wsdl which requires a basic > authentication to access the URl? > I think VW 7.5 gives an option to provide a username and password (in > the wsdl wizard) ut it is not added as the baic authentication. Actually you need only to set a user name and password. The server should send back a challenge with supported authentication schemas. The transport Htpp client resends the request with correct schema authentication. If you want to avoid this extra trip you can use the following code to basic set authentication: wsdlClient transportClient useBasicAuth. wsdlClient transportClient username: 'unString' password: 'pString'. Tamara |
Free forum by Nabble | Edit this page |