• catherine
  • NEWBIE
  • 5 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
Errors include:

Error    105    'Id' is not a member of 'basicSample_vb.sforce.Account'.    C:\Salesforce\Samples\AppExchange Developer Network\Visual Basic .Net\basicSample_vb_2005\Samples.vb    290    13    basicSample_vb

Error    110    Type 'sforce.sObject' is not defined.    C:\Salesforce\Samples\AppExchange Developer Network\Visual Basic .Net\basicSample_vb_2005\Samples.vb    362    58    basicSample_vb

Warnings include:

Warning    1    Type 'urn:enterprise.soap.sforce.com:ID' is not declared.    C:\Salesforce\Samples\AppExchange Developer Network\Visual Basic .Net\basicSample_vb_2005\Web References\sforce\enterprise.wsdl    9    12    basicSample_vb

Warning    102    Custom tool warning: Schema validation error: Schema item 'simpleType' named 'FaultCode' from namespace 'urn:fault.enterprise.soap.sforce.com' is invalid. The Enumeration constraining facet is invalid - 'fns' is an undeclared namespace.    C:\Salesforce\Samples\AppExchange Developer Network\Visual Basic .Net\basicSample_vb_2005\Web References\sforce\Reference.map    1    1    basicSample_vb

VS doesn't like the reference.map file at all:

<?xml version="1.0" encoding="utf-8"?>
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Results>
    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="file:///C:/Salesforce/WSDL/enterprise.wsdl" filename="enterprise.wsdl" />
  </Results>
</DiscoveryClientResultsFile>

The problem appears to be in the definitions section of the wsdl.

<definitions
xmlns:tns="urn:enterprise.soap.sforce.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:fns="urn:fault.enterprise.soap.sforce.com"
xmlns:ens="urn:sobject.enterprise.soap.sforce.com"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:enterprise.soap.sforce.com"
xmlns="http://schemas.xmlsoap.org/wsdl/">

  <types>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:sobject.enterprise.soap.sforce.com">
      <xsd:import namespace="urn:enterprise.soap.sforce.com" />
      <xsd:complexType name="sObject">
        <xsd:sequence>
          <xsd:element minOccurs="0" maxOccurs="unbounded" name="fieldsToNull" nillable="true" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="Id" nillable="true" type="tns:ID" />
        </xsd:sequence>
      </xsd:complexType>


If I change the highlighted lines to the following,  the green line above becomes valid and the errors go away. All I get is a message saying that
"Warning    1    The 'http://www.w3.org/2001/XMLSchema:definitions' element is not declared. "


<definitions targetNamespace="urn:enterprise.soap.sforce.com"
             xmlns:tns="urn:enterprise.soap.sforce.com"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
             xmlns:fns="urn:fault.enterprise.soap.sforce.com"
             xmlns:ens="urn:sobject.enterprise.soap.sforce.com"
             xmlns:xsd="http://schemas.xmlsoap.org/wsdl/">
  <types>

I don't know a whole lot about wsdl files and namespace declarations, but something funny is going on here. Would VS 2005 be requiring different references ? I downloaded the sample applications including related wsdl, which had the same problems as my generated one.

Hi. Hopefully someone has some clues.
Here are the facts:

1. Compiled and ran the quickstart_vb sample at work. To get it to log in to salesforce, this required salesforce urls to be added as Proxy Exceptions in IE. Fine - the proxy server was bypassed.

2. Upgraded the quickstart_vb sample application for use in VS2005 with .NET 2.0
    This works fine at home where I don't have corporate security configurations, or use a proxy server.

3. Tried running the upgraded sample at work and get the following error:

The remote server returned an error: (407) Proxy Authentication Required
at System.Net.HttpWebRequest.GetRequestStream().... etc.

when calling the following to login:
                binding = New sforce.SforceService
                lr = binding.login(userName, pwd)

I tried turning off proxy use in IE altogether but oddly that didn't help.

I've also tried various settings in my app.config file -
    <system.net>
      <defaultProxy enabled="true" useDefaultCredentials="true">
        <proxy usesystemdefault="False" bypassonlocal="True"></proxy>
        <bypasslist>
          <add address="na1\.salesforce\.com"/>
          <add address="[a-z]+\.salesforce\.com"/>
          <add address="[a-z]+\.sforce\.com"/>
          <add address="[a-z]+\.[a-z]+\.sforce\.com"/>
        </bypasslist>
      </defaultProxy>
    </system.net>

The Reference.vb module that gets imported with the sforce WSDL looks like it's doing something with credetials, but this is auto generated source and I can't even step through in debug mode because remote debugging is required and local policy won't allow it.

I really want to move ahead using .NET 2.0 and there must be a way to log into salesforce and replicate the quickstart functionality without being restricted by this proxy issue. .NET 1.1 worked fine, so MS must have some tweak somewhere to enable .NET 2.0 to do the same thing. ... or maybe something related to the WSDL has to change?

I'm fairly new to salesforce and to web service type development so I'll apologise now if I proceed to ask some dumb questions!
(I have been developing in VB and other various languages for 15 years though ;-))

tia

Catherine






Errors include:

Error    105    'Id' is not a member of 'basicSample_vb.sforce.Account'.    C:\Salesforce\Samples\AppExchange Developer Network\Visual Basic .Net\basicSample_vb_2005\Samples.vb    290    13    basicSample_vb

Error    110    Type 'sforce.sObject' is not defined.    C:\Salesforce\Samples\AppExchange Developer Network\Visual Basic .Net\basicSample_vb_2005\Samples.vb    362    58    basicSample_vb

Warnings include:

Warning    1    Type 'urn:enterprise.soap.sforce.com:ID' is not declared.    C:\Salesforce\Samples\AppExchange Developer Network\Visual Basic .Net\basicSample_vb_2005\Web References\sforce\enterprise.wsdl    9    12    basicSample_vb

Warning    102    Custom tool warning: Schema validation error: Schema item 'simpleType' named 'FaultCode' from namespace 'urn:fault.enterprise.soap.sforce.com' is invalid. The Enumeration constraining facet is invalid - 'fns' is an undeclared namespace.    C:\Salesforce\Samples\AppExchange Developer Network\Visual Basic .Net\basicSample_vb_2005\Web References\sforce\Reference.map    1    1    basicSample_vb

VS doesn't like the reference.map file at all:

<?xml version="1.0" encoding="utf-8"?>
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Results>
    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="file:///C:/Salesforce/WSDL/enterprise.wsdl" filename="enterprise.wsdl" />
  </Results>
</DiscoveryClientResultsFile>

The problem appears to be in the definitions section of the wsdl.

<definitions
xmlns:tns="urn:enterprise.soap.sforce.com"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:fns="urn:fault.enterprise.soap.sforce.com"
xmlns:ens="urn:sobject.enterprise.soap.sforce.com"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:enterprise.soap.sforce.com"
xmlns="http://schemas.xmlsoap.org/wsdl/">

  <types>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:sobject.enterprise.soap.sforce.com">
      <xsd:import namespace="urn:enterprise.soap.sforce.com" />
      <xsd:complexType name="sObject">
        <xsd:sequence>
          <xsd:element minOccurs="0" maxOccurs="unbounded" name="fieldsToNull" nillable="true" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="Id" nillable="true" type="tns:ID" />
        </xsd:sequence>
      </xsd:complexType>


If I change the highlighted lines to the following,  the green line above becomes valid and the errors go away. All I get is a message saying that
"Warning    1    The 'http://www.w3.org/2001/XMLSchema:definitions' element is not declared. "


<definitions targetNamespace="urn:enterprise.soap.sforce.com"
             xmlns:tns="urn:enterprise.soap.sforce.com"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
             xmlns:fns="urn:fault.enterprise.soap.sforce.com"
             xmlns:ens="urn:sobject.enterprise.soap.sforce.com"
             xmlns:xsd="http://schemas.xmlsoap.org/wsdl/">
  <types>

I don't know a whole lot about wsdl files and namespace declarations, but something funny is going on here. Would VS 2005 be requiring different references ? I downloaded the sample applications including related wsdl, which had the same problems as my generated one.

Hi. Hopefully someone has some clues.
Here are the facts:

1. Compiled and ran the quickstart_vb sample at work. To get it to log in to salesforce, this required salesforce urls to be added as Proxy Exceptions in IE. Fine - the proxy server was bypassed.

2. Upgraded the quickstart_vb sample application for use in VS2005 with .NET 2.0
    This works fine at home where I don't have corporate security configurations, or use a proxy server.

3. Tried running the upgraded sample at work and get the following error:

The remote server returned an error: (407) Proxy Authentication Required
at System.Net.HttpWebRequest.GetRequestStream().... etc.

when calling the following to login:
                binding = New sforce.SforceService
                lr = binding.login(userName, pwd)

I tried turning off proxy use in IE altogether but oddly that didn't help.

I've also tried various settings in my app.config file -
    <system.net>
      <defaultProxy enabled="true" useDefaultCredentials="true">
        <proxy usesystemdefault="False" bypassonlocal="True"></proxy>
        <bypasslist>
          <add address="na1\.salesforce\.com"/>
          <add address="[a-z]+\.salesforce\.com"/>
          <add address="[a-z]+\.sforce\.com"/>
          <add address="[a-z]+\.[a-z]+\.sforce\.com"/>
        </bypasslist>
      </defaultProxy>
    </system.net>

The Reference.vb module that gets imported with the sforce WSDL looks like it's doing something with credetials, but this is auto generated source and I can't even step through in debug mode because remote debugging is required and local policy won't allow it.

I really want to move ahead using .NET 2.0 and there must be a way to log into salesforce and replicate the quickstart functionality without being restricted by this proxy issue. .NET 1.1 worked fine, so MS must have some tweak somewhere to enable .NET 2.0 to do the same thing. ... or maybe something related to the WSDL has to change?

I'm fairly new to salesforce and to web service type development so I'll apologise now if I proceed to ask some dumb questions!
(I have been developing in VB and other various languages for 15 years though ;-))

tia

Catherine